code: def set_job(self, key, func, args):
          
          res, pk = key
          jobs, lock = self._jobs
          task = _tasks.UpdateTask(func(*args), key)
          with lock:
              job = jobs[res].get(pk)
              had = bool(job)
              if not job:
                  job = task
                  jobs[res][pk] = job
              else:
                  task.cancel()
          self._log.debug('Scheduling: %s-%s (%s)', res.tag, pk,
                          'new task' if not had else 'dup')
          return job
docs: Get a scheduled task or set if none exists.
  
          Returns:
              - task coroutine/continuation