class_docstr: Object representing a single Python job to execute.
  
  Examples
  --------
  
  Create a new Python job that multiplies two numbers and then adds 5 to the result:
  
  .. code-block:: python
  
      # Create a batch object with a default Python image
  
      b = Batch(default_python_image='hailgenetics/python-dill:3.9-slim')
  
      def multiply(x, y):
          return x * y
  
      def add(x, y):
          return x + y
  
      j = b.new_python_job()
      result = j.call(multiply, 2, 3)
      result = j.call(add, result, 5)
  
      # Write out the str representation of result to a file
  
      b.write_output(result.as_str(), 'hello.txt')
  
      b.run()
  
  Notes
  -----
  This class should never be created directly by the user. Use :meth:`.Batch.new_python_job`
  instead.
class_docstr_tok: ["Object","representing","a","single","Python","job","to","execute",".","Examples","--","--","--","--","Create","a","new","Python","job","that","multiplies","two","numbers","and","then","adds","5","to","the","result",":","..","code-block",":",":","python","#","Create","a","batch","object","with","a","default","Python","image","b","=","Batch","(","default_python_image='hailgenetics\/python-dill:3.9-slim","'",")","def","multiply","(","x",",","y",")",":","return","x","*","y","def","add","(","x",",","y",")",":","return","x","+","y","j","=","b.new_python_job","(",")","result","=","j.call","(","multiply",",","2",",","3",")","result","=","j.call","(","add",",","result",",","5",")","#","Write","out","the","str","representation","of","result","to","a","file","b.write_output","(","result.as_str","(",")",",","'hello.txt","'",")","b.run","(",")","Notes","--","--","-","This","class","should","never","be","created","directly","by","the","user",".","Use",":","meth",":","`",".Batch.new_python_job","`","instead","."]
docstr: Set the job's docker image.
  
  Notes
  -----
  
  `image` must already exist and have the same version of Python as what is
  being used on the computer submitting the Batch. It also must have the
  `dill` Python package installed. You can use the function :func:`.docker.build_python_image`
  to build a new image containing `dill` and additional Python packages.
  
  Examples
  --------
  
  Set the job's docker image to `hailgenetics/python-dill:3.9-slim`:
  
  >>> b = Batch()
  >>> j = b.new_python_job()
  >>> (j.image('hailgenetics/python-dill:3.9-slim')
  ...   .call(print, 'hello'))
  >>> b.run()  # doctest: +SKIP
  
  Parameters
  ----------
  image:
      Docker image to use.
  
  Returns
  -------
  Same job object with docker image set.
docstr_tok: ["Set","the","job","'s","docker","image",".","Notes","--","--","-","`","image","`","must","already","exist","and","have","the","same","version","of","Python","as","what","is","being","used","on","the","computer","submitting","the","Batch",".","It","also","must","have","the","`","dill","`","Python","package","installed",".","You","can","use","the","function",":","func",":","`",".docker.build_python_image","`","to","build","a","new","image","containing","`","dill","`","and","additional","Python","packages",".","Examples","--","--","--","--","Set","the","job","'s","docker","image","to","`","hailgenetics\/python-dill:3.9-slim","`",":",">",">",">","b","=","Batch","(",")",">",">",">","j","=","b.new_python_job","(",")",">",">",">","(","j.image","(","'hailgenetics\/python-dill:3.9-slim","'",")","...",".call","(","print",",","'hello","'",")",")",">",">",">","b.run","(",")","#","doctest",":","+SKIP","Parameters","--","--","--","--","--","image",":","Docker","image","to","use",".","Returns","--","--","--","-","Same","job","object","with","docker","image","set","."]
code: def image(self, image: str) -> "PythonJob":
      """
      Set the job's docker image.
  
      Notes
      -----
  
      `image` must already exist and have the same version of Python as what is
      being used on the computer submitting the Batch. It also must have the
      `dill` Python package installed. You can use the function :func:`.docker.build_python_image`
      to build a new image containing `dill` and additional Python packages.
  
      Examples
      --------
  
      Set the job's docker image to `hailgenetics/python-dill:3.9-slim`:
  
      >>> b = Batch()
      >>> j = b.new_python_job()
      >>> (j.image('hailgenetics/python-dill:3.9-slim')
      ...   .call(print, 'hello'))
      >>> b.run()  # doctest: +SKIP
  
      Parameters
      ----------
      image:
          Docker image to use.
  
      Returns
      -------
      Same job object with docker image set.
      """
  
      self._image = image
      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 3 for calling the PythonJob obj's underlying member method code with example usage: obj.image(image) and returns: self