code: def UpdateTaskAsProcessingByIdentifier(self, task_identifier):
      
      with self._lock:
        task_processing = self._tasks_processing.get(task_identifier, None)
        if task_processing:
          task_processing.UpdateProcessingTime()
          self._UpdateLatestProcessingTime(task_processing)
          return
  
        task_queued = self._tasks_queued.get(task_identifier, None)
        if task_queued:
          logger.debug('Task {0:s} was queued, now processing.'.format(
              task_identifier))
          self._tasks_processing[task_identifier] = task_queued
          del self._tasks_queued[task_identifier]
  
          task_queued.UpdateProcessingTime()
          self._UpdateLatestProcessingTime(task_queued)
          return
  
        task_abandoned = self._tasks_abandoned.get(task_identifier, None)
        if task_abandoned:
          del self._tasks_abandoned[task_identifier]
          self._tasks_processing[task_identifier] = task_abandoned
          logger.debug('Task {0:s} was abandoned, but now processing.'.format(
              task_identifier))
  
          task_abandoned.UpdateProcessingTime()
          self._UpdateLatestProcessingTime(task_abandoned)
          return
  
        if task_identifier in self._tasks_pending_merge:
          # No need to update the processing time, as this task is already
          # finished processing and is just waiting for merge.
          return
  
      # If we get here, we don't know what state the tasks is in, so raise.
      raise KeyError('Status of task {0:s} is unknown.'.format(task_identifier))
docs: Updates the task manager to reflect the task is processing.
  
      Args:
        task_identifier (str): unique identifier of the task.
  
      Raises:
        KeyError: if the task is not known to the task manager.