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: Sets the element layouts on an iterator resource tensor.
  
  Args:
    iterator_resource_dtensor: a DTensor created by packing the individiual
      iterator resource tensors.
    layouts: the flattened list of layouts to be applied to the elements
      emitted by the iterator resource DTensor.
docstr_tok: ["Sets","the","element","layouts","on","an","iterator","resource","tensor",".","Args",":","iterator_resource_dtensor",":","a","DTensor","created","by","packing","the","individiual","iterator","resource","tensors",".","layouts",":","the","flattened","list","of","layouts","to","be","applied","to","the","elements","emitted","by","the","iterator","resource","DTensor","."]
code: def set_iterator_element_layouts(
      self, iterator_resource_dtensor, layouts: List[layout_lib.Layout]
  ):
      """Sets the element layouts on an iterator resource tensor.
  
      Args:
        iterator_resource_dtensor: a DTensor created by packing the individiual
          iterator resource tensors.
        layouts: the flattened list of layouts to be applied to the elements
          emitted by the iterator resource DTensor.
      """
      _pywrap_dtensor_device.SetIteratorElementLayouts(
          context.context()._handle,  # pylint: disable=protected-access
          iterator_resource_dtensor,
          [layout.to_string() for layout in layouts],
          self._device_info,
      )
  
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 14 for calling the DTensorDevice obj's underlying member method code with example usage: obj.set_iterator_element_layouts(iterator_resource_dtensor, layouts) without return types