parameters: (self, device=None)
return_statement: return self._device_map.select_for_device(self._values, device)
docstring: Returns the value for the current device or raises a ValueError.
docstring_summary: Returns the value for the current device or raises a ValueError.
docstring_tokens: Returns the value for the current device or raises a ValueError .
function: def get(self, device=None):
      """Returns the value for the current device or raises a ValueError."""
      if device is None:
        replica_context = distribution_strategy_context.get_replica_context()
        if replica_context:
          return self._device_map.select_for_current_replica(
              self._values, replica_context)
        else:
          device = distribute_lib.get_update_device()
          if device is None:
            return self._get_cross_replica()
      device = device_util.canonicalize(device)
      return self._device_map.select_for_device(self._values, device)
function_tokens: def get ( self , device = None ) : if device is None : replica_context = distribution_strategy_context . get_replica_context ( ) if replica_context : return self . _device_map . select_for_current_replica ( self . _values , replica_context ) else : device = distribute_lib . get_update_device ( ) if device is None : return self . _get_cross_replica ( ) device = device_util . canonicalize ( device ) return self . _device_map . select_for_device ( self . _values , device )