class_docstr: Wraps a custom device which attempts to propagate tensor layouts.
class_docstr_tok: ["Wraps","a","custom","device","which","attempts","to","propagate","tensor","layouts","."]
docstr: Translates TPU core locations to TPU core IDs.
  
  Args:
    tpu_core_locations: A list of TPU core locations. Each one is a list of
      four unsigned integers, [x, y, z, core].
  
  Returns:
    A list of corresponding TPU core IDs.
docstr_tok: ["Translates","TPU","core","locations","to","TPU","core","IDs",".","Args",":","tpu_core_locations",":","A","list","of","TPU","core","locations",".","Each","one","is","a","list","of","four","unsigned","integers",",","[","x",",","y",",","z",",","core","]",".","Returns",":","A","list","of","corresponding","TPU","core","IDs","."]
code: def tpu_core_locations_to_ids(self, tpu_core_locations):
      """Translates TPU core locations to TPU core IDs.
  
      Args:
        tpu_core_locations: A list of TPU core locations. Each one is a list of
          four unsigned integers, [x, y, z, core].
  
      Returns:
        A list of corresponding TPU core IDs.
      """
      return _pywrap_dtensor_device.TPUCoreLocationsToIDs(
          context.context()._handle,  # pylint: disable=protected-access
          self._device_info,
          tpu_core_locations,
      )
  
imports: import contextlib
  import logging
  import threading
  from typing import Any, List, Sequence, Set
  import numpy
  from tensorflow.core.framework import attr_value_pb2
  from tensorflow.dtensor.python import config
  from tensorflow.dtensor.python import layout
  from tensorflow.python import _pywrap_dtensor_device
  from tensorflow.python.eager import context
  from tensorflow.python.eager import core
  from tensorflow.python.framework import device
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import sparse_tensor
  from tensorflow.python.framework import tensor_util
  from tensorflow.python.util import _pywrap_utils
label_desc: Use image node_id 12 for calling the DTensorDevice obj's underlying member method code with example usage: obj.tpu_core_locations_to_ids(tpu_core_locations) and returns: _pywrap_dtensor_device