code: def task_control(self):
          
          return TaskControl(
                          self,
                          self.state,
                          self.path,
                          self._gateway)
docs: Method to control a task.