(self, label)
return status
Add a label to the sketch.

        Args:
            label (str): A string with the label to add to the sketch.

        Returns:
            bool: A boolean to indicate whether the label was successfully
                  added to the sketch.
Add a label to the sketch.
Add a label to the sketch .
def add_sketch_label(self, label):
        """Add a label to the sketch.

        Args:
            label (str): A string with the label to add to the sketch.

        Returns:
            bool: A boolean to indicate whether the label was successfully
                  added to the sketch.
        """
        if label in self.labels:
            logger.error(
                'Label [{0:s}] already applied to sketch.'.format(label))
            return False

        resource_url = '{0:s}/sketches/{1:d}/'.format(
            self.api.api_root, self.id)

        data = {
            'labels': [label],
            'label_action': 'add',
        }
        response = self.api.session.post(resource_url, json=data)

        status = error.check_return_status(response, logger)
        if not status:
            logger.error(
                'Unable to add the label [{0:s}] to the sketch.'.format(label))

        return status
def add_sketch_label ( self , label ) : if label in self . labels : logger . error ( 'Label [{0:s}] already applied to sketch.' . format ( label ) ) return False resource_url = '{0:s}/sketches/{1:d}/' . format ( self . api . api_root , self . id ) data = { 'labels' : [ label ] , 'label_action' : 'add' , } response = self . api . session . post ( resource_url , json = data ) status = error . check_return_status ( response , logger ) if not status : logger . error ( 'Unable to add the label [{0:s}] to the sketch.' . format ( label ) ) return status