(self, label, toggle=False)
Add label to the Event.

        Args:
            label: Label name.
            toggle: If True the label will be removed if it exists already.

        Raises: RuntimeError of sketch ID is missing.
Add label to the Event.
Add label to the Event .
def add_label(self, label, toggle=False):
        """Add label to the Event.

        Args:
            label: Label name.
            toggle: If True the label will be removed if it exists already.

        Raises: RuntimeError of sketch ID is missing.
        """
        if not self.sketch:
            raise RuntimeError('No sketch provided.')

        user_id = 0
        updated_event = self.datastore.set_label(
            self.index_name, self.event_id, self.event_type, self.sketch.id,
            user_id, label, toggle=toggle, single_update=False)
        self.commit(updated_event)
def add_label ( self , label , toggle = False ) : if not self . sketch : raise RuntimeError ( 'No sketch provided.' ) user_id = 0 updated_event = self . datastore . set_label ( self . index_name , self . event_id , self . event_type , self . sketch . id , user_id , label , toggle = toggle , single_update = False ) self . commit ( updated_event )