code: def _update_priority(self, task, prio, worker):
          
          task.priority = prio = max(prio, task.priority)
          for dep in task.deps or []:
              t = self._state.get_task(dep)
              if t is not None and prio > t.priority:
                  self._update_priority(t, prio, worker)
docs: Update priority of the given task.
  
          Priority can only be increased.
          If the task doesn't exist, a placeholder task is created to preserve priority when the task is later scheduled.