code: def CreateTask(self, session_identifier):
      
      task = tasks.Task(session_identifier)
      logger.debug('Created task: {0:s}.'.format(task.identifier))
  
      with self._lock:
        self._tasks_queued[task.identifier] = task
        self._total_number_of_tasks += 1
  
        self.SampleTaskStatus(task, 'created')
  
      return task
docs: Creates a task.
  
      Args:
        session_identifier (str): the identifier of the session the task is
            part of.
  
      Returns:
        Task: task attribute container.