(self, events, label_name)
return error.get_response_json(response, logger)
Labels one or more events with label_name.

        Args:
            events: Array of JSON objects representing events.
            label_name: String to label the event with.

        Returns:
            Dictionary with query results.
Labels one or more events with label_name.
Labels one or more events with label_name .
def label_events(self, events, label_name):
        """Labels one or more events with label_name.

        Args:
            events: Array of JSON objects representing events.
            label_name: String to label the event with.

        Returns:
            Dictionary with query results.
        """
        if self.is_archived():
            raise RuntimeError(
                'Unable to label events in an archived sketch.')

        form_data = {
            'annotation': label_name,
            'annotation_type': 'label',
            'events': events
        }
        resource_url = '{0:s}/sketches/{1:d}/event/annotate/'.format(
            self.api.api_root, self.id)
        response = self.api.session.post(resource_url, json=form_data)
        return error.get_response_json(response, logger)
def label_events ( self , events , label_name ) : if self . is_archived ( ) : raise RuntimeError ( 'Unable to label events in an archived sketch.' ) form_data = { 'annotation' : label_name , 'annotation_type' : 'label' , 'events' : events } resource_url = '{0:s}/sketches/{1:d}/event/annotate/' . format ( self . api . api_root , self . id ) response = self . api . session . post ( resource_url , json = form_data ) return error . get_response_json ( response , logger )