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: Set the maximum amount of time this job can run for in seconds.
  
  Notes
  -----
  Can only be used with the :class:`.backend.ServiceBackend`.
  
  Examples
  --------
  
  >>> b = Batch(backend=backend.ServiceBackend('test'))
  >>> j = b.new_job()
  >>> (j.timeout(10)
  ...   .command(f'echo "hello"'))
  
  Parameters
  ----------
  timeout:
      Maximum amount of time in seconds for a job to run before being killed.
      If `None`, there is no timeout.
  
  Returns
  -------
  Same job object set with a timeout in seconds.
docstr_tok: ["Set","the","maximum","amount","of","time","this","job","can","run","for","in","seconds",".","Notes","--","--","-","Can","only","be","used","with","the",":","class",":","`",".backend.ServiceBackend","`",".","Examples","--","--","--","--",">",">",">","b","=","Batch","(","backend=backend.ServiceBackend","(","'test","'",")",")",">",">",">","j","=","b.new_job","(",")",">",">",">","(","j.timeout","(","10",")","...",".command","(","f'echo","``","hello","''","'",")",")","Parameters","--","--","--","--","--","timeout",":","Maximum","amount","of","time","in","seconds","for","a","job","to","run","before","being","killed",".","If","`","None","`",",","there","is","no","timeout",".","Returns","--","--","--","-","Same","job","object","set","with","a","timeout","in","seconds","."]
code: def timeout(self, timeout: Optional[Union[float, int]]) -> Self:
      """
      Set the maximum amount of time this job can run for in seconds.
  
      Notes
      -----
      Can only be used with the :class:`.backend.ServiceBackend`.
  
      Examples
      --------
  
      >>> b = Batch(backend=backend.ServiceBackend('test'))
      >>> j = b.new_job()
      >>> (j.timeout(10)
      ...   .command(f'echo "hello"'))
  
      Parameters
      ----------
      timeout:
          Maximum amount of time in seconds for a job to run before being killed.
          If `None`, there is no timeout.
  
      Returns
      -------
      Same job object set with a timeout in seconds.
      """
  
      if not isinstance(self._batch._backend, backend.ServiceBackend):
          raise NotImplementedError(
              "A ServiceBackend is required to use the 'timeout' option"
          )
  
      self._timeout = timeout
      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 16 for calling the Job obj's underlying member method code with example usage: obj.timeout(timeout) and returns: self