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 job's memory requirements.
  
  Examples
  --------
  
  Set the job's memory requirement to be 3Gi:
  
  >>> b = Batch()
  >>> j = b.new_job()
  >>> (j.memory('3Gi')
  ...   .command(f'echo "hello"'))
  >>> b.run()
  
  Notes
  -----
  
  The memory expression must be of the form {number}{suffix}
  where valid optional suffixes are *K*, *Ki*, *M*, *Mi*,
  *G*, *Gi*, *T*, *Ti*, *P*, and *Pi*. Omitting a suffix means
  the value is in bytes.
  
  For the :class:`.ServiceBackend`, the values 'lowmem', 'standard',
  and 'highmem' are also valid arguments. 'lowmem' corresponds to
  approximately 1 Gi/core, 'standard' corresponds to approximately
  4 Gi/core, and 'highmem' corresponds to approximately 7 Gi/core.
  The default value is 'standard'.
  
  Parameters
  ----------
  memory:
      Units are in bytes if `memory` is an :obj:`int`. If `None`,
      use the default value for the :class:`.ServiceBackend` ('standard').
  
  Returns
  -------
  Same job object with memory requirements set.
docstr_tok: ["Set","the","job","'s","memory","requirements",".","Examples","--","--","--","--","Set","the","job","'s","memory","requirement","to","be","3Gi",":",">",">",">","b","=","Batch","(",")",">",">",">","j","=","b.new_job","(",")",">",">",">","(","j.memory","(","'3Gi","'",")","...",".command","(","f'echo","``","hello","''","'",")",")",">",">",">","b.run","(",")","Notes","--","--","-","The","memory","expression","must","be","of","the","form","{","number","}","{","suffix","}","where","valid","optional","suffixes","are","*","K","*",",","*","Ki","*",",","*","M","*",",","*","Mi","*",",","*","G","*",",","*","Gi","*",",","*","T","*",",","*","Ti","*",",","*","P","*",",","and","*","Pi","*",".","Omitting","a","suffix","means","the","value","is","in","bytes",".","For","the",":","class",":","`",".ServiceBackend","`",",","the","values","'lowmem","'",",","'standard","'",",","and","'highmem","'","are","also","valid","arguments",".","'lowmem","'","corresponds","to","approximately","1","Gi\/core",",","'standard","'","corresponds","to","approximately","4","Gi\/core",",","and","'highmem","'","corresponds","to","approximately","7","Gi\/core",".","The","default","value","is","'standard","'",".","Parameters","--","--","--","--","--","memory",":","Units","are","in","bytes","if","`","memory","`","is","an",":","obj",":","`","int","`",".","If","`","None","`",",","use","the","default","value","for","the",":","class",":","`",".ServiceBackend","`","(","'standard","'",")",".","Returns","--","--","--","-","Same","job","object","with","memory","requirements","set","."]
code: def memory(self, memory: Optional[Union[str, int]]) -> Self:
      """
      Set the job's memory requirements.
  
      Examples
      --------
  
      Set the job's memory requirement to be 3Gi:
  
      >>> b = Batch()
      >>> j = b.new_job()
      >>> (j.memory('3Gi')
      ...   .command(f'echo "hello"'))
      >>> b.run()
  
      Notes
      -----
  
      The memory expression must be of the form {number}{suffix}
      where valid optional suffixes are *K*, *Ki*, *M*, *Mi*,
      *G*, *Gi*, *T*, *Ti*, *P*, and *Pi*. Omitting a suffix means
      the value is in bytes.
  
      For the :class:`.ServiceBackend`, the values 'lowmem', 'standard',
      and 'highmem' are also valid arguments. 'lowmem' corresponds to
      approximately 1 Gi/core, 'standard' corresponds to approximately
      4 Gi/core, and 'highmem' corresponds to approximately 7 Gi/core.
      The default value is 'standard'.
  
      Parameters
      ----------
      memory:
          Units are in bytes if `memory` is an :obj:`int`. If `None`,
          use the default value for the :class:`.ServiceBackend` ('standard').
  
      Returns
      -------
      Same job object with memory requirements set.
      """
  
      self._memory = opt_str(memory)
      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 11 for calling the Job obj's underlying member method code with example usage: obj.memory(memory) and returns: self