def to_task(task):
        """Serializes task to id string
        :param task: object to serialize
        :return: string id
        """
        from sevenbridges.models.task import Task
        if not task:
            raise SbgError('Task is required!')
        elif isinstance(task, Task):
            return task.id
        elif isinstance(task, six.string_types):
            return task
        else:
            raise SbgError('Invalid task parameter!')
def to_task ( task ) : from sevenbridges . models . task import Task if not task : raise SbgError ( 'Task is required!' ) elif isinstance ( task , Task ) : return task . id elif isinstance ( task , six . string_types ) : return task else : raise SbgError ( 'Invalid task parameter!' )
Serializes task to id string
        :param task: object to serialize
        :return: string id