code: def CreateTaskStorage(self, task):
      
      if self._storage_type != definitions.STORAGE_TYPE_SESSION:
        raise IOError('Unsupported storage type.')
  
      storage_file_path = self._GetTaskStorageFilePath(task)
      return self._CreateTaskStorageWriter(storage_file_path, task)
docs: Creates a task storage.
  
      The task storage is used to store attributes created by the task.
  
      Args:
        task(Task): task.
  
      Returns:
        StorageWriter: storage writer.
  
      Raises:
        IOError: if the storage type is not supported.
        OSError: if the storage type is not supported.