<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def CreateTask(self, session_identifier):
 """Creates a task. Args: session_identifier (str):
 the identifier of the session the task is part of. Returns: Task: task attribute container. """

    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