class_docstr: Object representing a single job to execute.
  
  Notes
  -----
  This class should never be created directly by the user. Use :meth:`.Batch.new_job`,
  :meth:`.Batch.new_bash_job`, or :meth:`.Batch.new_python_job` instead.
class_docstr_tok: ["Object","representing","a","single","job","to","execute",".","Notes","--","--","-","This","class","should","never","be","created","directly","by","the","user",".","Use",":","meth",":","`",".Batch.new_job","`",",",":","meth",":","`",".Batch.new_bash_job","`",",","or",":","meth",":","`",".Batch.new_python_job","`","instead","."]
docstr: Explicitly set dependencies on other jobs.
  
  Examples
  --------
  
  Initialize the batch:
  
  >>> b = Batch()
  
  Create the first job:
  
  >>> j1 = b.new_job()
  >>> j1.command(f'echo "hello"')
  
  Create the second job `j2` that depends on `j1`:
  
  >>> j2 = b.new_job()
  >>> j2.depends_on(j1)
  >>> j2.command(f'echo "world"')
  
  Execute the batch:
  
  >>> b.run()
  
  Notes
  -----
  Dependencies between jobs are automatically created when resources from
  one job are used in a subsequent job. This method is only needed when
  no intermediate resource exists and the dependency needs to be explicitly
  set.
  
  Parameters
  ----------
  jobs:
      Sequence of jobs to depend on.
  
  Returns
  -------
  Same job object with dependencies set.
docstr_tok: ["Explicitly","set","dependencies","on","other","jobs",".","Examples","--","--","--","--","Initialize","the","batch",":",">",">",">","b","=","Batch","(",")","Create","the","first","job",":",">",">",">","j1","=","b.new_job","(",")",">",">",">","j1.command","(","f'echo","``","hello","''","'",")","Create","the","second","job","`","j2","`","that","depends","on","`","j1","`",":",">",">",">","j2","=","b.new_job","(",")",">",">",">","j2.depends_on","(","j1",")",">",">",">","j2.command","(","f'echo","``","world","''","'",")","Execute","the","batch",":",">",">",">","b.run","(",")","Notes","--","--","-","Dependencies","between","jobs","are","automatically","created","when","resources","from","one","job","are","used","in","a","subsequent","job",".","This","method","is","only","needed","when","no","intermediate","resource","exists","and","the","dependency","needs","to","be","explicitly","set",".","Parameters","--","--","--","--","--","jobs",":","Sequence","of","jobs","to","depend","on",".","Returns","--","--","--","-","Same","job","object","with","dependencies","set","."]
code: def depends_on(self, *jobs: "Job") -> Self:
      """
      Explicitly set dependencies on other jobs.
  
      Examples
      --------
  
      Initialize the batch:
  
      >>> b = Batch()
  
      Create the first job:
  
      >>> j1 = b.new_job()
      >>> j1.command(f'echo "hello"')
  
      Create the second job `j2` that depends on `j1`:
  
      >>> j2 = b.new_job()
      >>> j2.depends_on(j1)
      >>> j2.command(f'echo "world"')
  
      Execute the batch:
  
      >>> b.run()
  
      Notes
      -----
      Dependencies between jobs are automatically created when resources from
      one job are used in a subsequent job. This method is only needed when
      no intermediate resource exists and the dependency needs to be explicitly
      set.
  
      Parameters
      ----------
      jobs:
          Sequence of jobs to depend on.
  
      Returns
      -------
      Same job object with dependencies set.
      """
  
      for j in jobs:
          self._dependencies.add(j)
      return self
  
imports: import asyncio
  import inspect
  import os
  import re
  import textwrap
  import warnings
  from shlex import quote
  from typing import Any, Callable, Dict, List, Optional, Set, Tuple, Union, cast, Literal
  from typing_extensions import Self
  import hailtop.batch_client.client
  from .None import backend, batch
  from .None import resource
  from .exceptions import BatchException
label_desc: Use image node_id 8 for calling the Job obj's underlying member method code with example usage: obj.depends_on() and returns: self