code: def SampleTaskStatus(self, task, status):
      
      if self._tasks_profiler:
        self._tasks_profiler.Sample(task, status)
docs: Takes a sample of the status of the task for profiling.
  
      Args:
        task (Task): a task.
        status (str): status.