Decorator for adding a label to the process.
    These labels are applied to any child Processes produced by event
978350
def tagged(*tags: Tags) -> Callable:
    global GREENSIM_TAG_ATTRIBUTE
    
    def hook(event: Callable):
        def wrapper(*args, **kwargs):
            event(*args, **kwargs)
        setattr(wrapper, GREENSIM_TAG_ATTRIBUTE, tags)
        return wrapper
    return hook
775759
def addCallback(cls, eventType, func, record=None, once=False):
        
        callbacks = cls.callbacks()
        callbacks.setdefault(eventType, [])
        callbacks[eventType].append((func, record, once))
954578
def update_form_labels(self, request=None, obj=None, form=None):
        
        for form_label in self.custom_form_labels:
            if form_label.field in form.base_fields:
                label = form_label.get_form_label(
                    request=request, obj=obj, model=self.model, form=form
                )
                if label:
                    form.base_fields[form_label.field].label = mark_safe(label)
        return form
278341
def bind(self, event_name, callback, *args, **kwargs):
        
        self.event_callbacks[event_name].append((callback, args, kwargs))
734674
def add_event(self, func: Callable, event: str) -> None:
        
        self._events[event].add(func)
586255
def paintEvent(self, event):
        

        super(type(self), self).paintEvent(event)

        show_message = True
        model = self.model()
        if issubclass(type(model), GraphModel):
            if model.has_nodes():
                show_message = False
        elif issubclass(type(model), QAbstractItemModel) or \
                issubclass(type(model), QAbstractListModel) or \
                issubclass(type(model), QAbstractTableModel):
            if model.rowCount():
                show_message = False

        if show_message:
            self.__notifier.show_message(self.__message, 0)
        else:
            self.__notifier.hide_message()
480889
def contribute_to_class(self, process, fields, name):
        
        self.name = name
        self.process = process
        fields[name] = self
1363178
def handler(event):
    """"""
    def decorator(fn):
        def apply(cls):
            event.connect(fn, sender=cls)
            return cls

        fn.apply = apply
        return fn
    return decorator
781052
def register(self, event_type: str,
                 **data_detail: Any) -> Callable[[AsyncCallback], AsyncCallback]:
        """"""
        def decorator(func: AsyncCallback) -> AsyncCallback:
            self.add(func, event_type, **data_detail)
            return func
        return decorator
355903
def add_event(self, event):
        
        if not isinstance(event, event_pb2.Event):
            raise TypeError("Expected an event_pb2.Event proto, "
                            " but got %s" % type(event))
        self._async_writer.write(event.SerializeToString())
612070
private static <I, D> void markAndPropagate(AbstractBaseDTNode<I, D> node, D label) {
        AbstractBaseDTNode<I, D> curr = node;

        while (curr != null && curr.getSplitData() != null) {
            if (!curr.getSplitData().mark(label)) {
                return;
            }
            curr = curr.getParent();
        }
    }
766203
def AddEventData(self, event_data):
    
    self._RaiseIfNotWritable()

    self._AddAttributeContainer(self._CONTAINER_TYPE_EVENT_DATA, event_data)
126916
def add(self, response, label=None):
        
        if not isinstance(response, sip_response.sip_response):
            raise Exception(
                'can only add sip_reponse.sip_response objects'
            )
        self.objects.append(response)

        if label is None:
            self.labels.append('na')
        else:
            self.labels.append(label)
1355853
def add(self, label):
        
        self._labels[label.id] = label
        self._dirty = True
1294791
def add_event(self, event, prepend=False):
        
        if prepend:
            self._events.insert(0, event)
        else:
            self._events.append(event)
835588
def add_item(self, label, s):
        
        self.append(Command('item', options=label))
        self.append(s)
945883
protected String processLabel(String label, String name) {
    if (null != label) {
      if (Strings.isEmpty(label)) return null;
      else return getText(label);
    } else return getText(name);
  }