parameters: (self, job=None, replica=None, task=None, device_type=None,
                 device_index=None)
docstring: Create a new `DeviceSpec` object.
  
      Args:
        job: string.  Optional job name.
        replica: int.  Optional replica index.
        task: int.  Optional task index.
        device_type: Optional device type string (e.g. "CPU" or "GPU")
        device_index: int.  Optional device index.  If left
          unspecified, device represents 'any' device_index.
docstring_summary: Create a new `DeviceSpec` object.
docstring_tokens: Create a new DeviceSpec object .
function: def __init__(self, job=None, replica=None, task=None, device_type=None,
                 device_index=None):
      """Create a new `DeviceSpec` object.
  
      Args:
        job: string.  Optional job name.
        replica: int.  Optional replica index.
        task: int.  Optional task index.
        device_type: Optional device type string (e.g. "CPU" or "GPU")
        device_index: int.  Optional device index.  If left
          unspecified, device represents 'any' device_index.
      """
      self.job = job
      self.replica = replica
      self.task = task
      if device_type == "cpu" or device_type == "gpu":
        # For backwards compatibility only, we support lowercase variants of
        # cpu and gpu but turn them into uppercase here.
        self.device_type = device_type.upper()
      else:
        self.device_type = device_type
      self.device_index = device_index
function_tokens: def __init__ ( self , job = None , replica = None , task = None , device_type = None , device_index = None ) : self . job = job self . replica = replica self . task = task if device_type == "cpu" or device_type == "gpu" : # For backwards compatibility only, we support lowercase variants of # cpu and gpu but turn them into uppercase here. self . device_type = device_type . upper ( ) else : self . device_type = device_type self . device_index = device_index