docs: def add_task_to_job(self, job_or_job_name, task_command, task_name=None,
                          **kwargs):
          """ Add a task to a job owned by the Dagobah instance. """
  
          if isinstance(job_or_job_name, Job):
              job = job_or_job_name
          else:
              job = self.get_job(job_or_job_name)
  
          if not job:
              raise DagobahError('job %s does not exist' % job_or_job_name)
  
          logger.debug('Adding task with command {0} to job {1}'.format(task_command, job.name))
  
          if not job.state.allow_change_graph:
              raise DagobahError("job's graph is immutable in its current " +
                                 "state: %s"
                                 % job.state.status)
  
          job.add_task(task_command, task_name, **kwargs)
          job.commit()