code: def patch_worker_run_task():
      
      _run_task = luigi.worker.Worker._run_task
  
      def run_task(self, task_id):
          task = self._scheduled_tasks[task_id]
  
          task._worker_id = self._id
          task._worker_task = self._first_task
  
          try:
              _run_task(self, task_id)
          finally:
              task._worker_id = None
              task._worker_task = None
  
          # make worker disposable when sandboxed
          if os.getenv("LAW_SANDBOX_SWITCHED") == "1":
              self._start_phasing_out()
  
      luigi.worker.Worker._run_task = run_task
docs: Patches the ``luigi.worker.Worker._run_task`` method to store the worker id and the id of its
      first task in the task. This information is required by the sandboxing mechanism