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 CPU requirements.
  
  Notes
  -----
  
  The string expression must be of the form {number}{suffix}
  where the optional suffix is *m* representing millicpu.
  Omitting a suffix means the value is in cpu.
  
  For the :class:`.ServiceBackend`, `cores` must be a power of
  two between 0.25 and 16.
  
  Examples
  --------
  
  Set the job's CPU requirement to 250 millicpu:
  
  >>> b = Batch()
  >>> j = b.new_job()
  >>> (j.cpu('250m')
  ...   .command(f'echo "hello"'))
  >>> b.run()
  
  Parameters
  ----------
  cores:
      Units are in cpu if `cores` is numeric. If `None`,
      use the default value for the :class:`.ServiceBackend`
      (1 cpu).
  
  Returns
  -------
  Same job object with CPU requirements set.
docstr_tok: ["Set","the","job","'s","CPU","requirements",".","Notes","--","--","-","The","string","expression","must","be","of","the","form","{","number","}","{","suffix","}","where","the","optional","suffix","is","*","m","*","representing","millicpu",".","Omitting","a","suffix","means","the","value","is","in","cpu",".","For","the",":","class",":","`",".ServiceBackend","`",",","`","cores","`","must","be","a","power","of","two","between","0.25","and","16",".","Examples","--","--","--","--","Set","the","job","'s","CPU","requirement","to","250","millicpu",":",">",">",">","b","=","Batch","(",")",">",">",">","j","=","b.new_job","(",")",">",">",">","(","j.cpu","(","'250m","'",")","...",".command","(","f'echo","``","hello","''","'",")",")",">",">",">","b.run","(",")","Parameters","--","--","--","--","--","cores",":","Units","are","in","cpu","if","`","cores","`","is","numeric",".","If","`","None","`",",","use","the","default","value","for","the",":","class",":","`",".ServiceBackend","`","(","1","cpu",")",".","Returns","--","--","--","-","Same","job","object","with","CPU","requirements","set","."]
code: def cpu(self, cores: Optional[Union[str, int, float]]) -> Self:
      """
      Set the job's CPU requirements.
  
      Notes
      -----
  
      The string expression must be of the form {number}{suffix}
      where the optional suffix is *m* representing millicpu.
      Omitting a suffix means the value is in cpu.
  
      For the :class:`.ServiceBackend`, `cores` must be a power of
      two between 0.25 and 16.
  
      Examples
      --------
  
      Set the job's CPU requirement to 250 millicpu:
  
      >>> b = Batch()
      >>> j = b.new_job()
      >>> (j.cpu('250m')
      ...   .command(f'echo "hello"'))
      >>> b.run()
  
      Parameters
      ----------
      cores:
          Units are in cpu if `cores` is numeric. If `None`,
          use the default value for the :class:`.ServiceBackend`
          (1 cpu).
  
      Returns
      -------
      Same job object with CPU requirements set.
      """
  
      self._cpu = opt_str(cores)
      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 12 for calling the Job obj's underlying member method code with example usage: obj.cpu(cores) and returns: self