class_docstr: A helper object to build a device infeed queue with input partition.
  
  Args:
    number_of_tuple_elements: the number of Tensors fed atomically through the
      queue, must be present unless it can be inferred from other arguments.
    device_assignment: A TPU `DeviceAssignment` which is used to place all the
      partitions to different TPU infeed queues.
    host_id: The id of the host machine.
    input_partition_dims: A nested list/tuple of integers. Each inner
      list/tuple describes how to partition the corresponding input tensor.
    tuple_types: If not None, a list of types of the elements of the queue.
    tuple_shapes: If not None, a list of shapes of the elements of the queue.
    name: The name of the queue.
class_docstr_tok: ["A","helper","object","to","build","a","device","infeed","queue","with","input","partition",".","Args",":","number_of_tuple_elements",":","the","number","of","Tensors","fed","atomically","through","the","queue",",","must","be","present","unless","it","can","be","inferred","from","other","arguments",".","device_assignment",":","A","TPU","`","DeviceAssignment","`","which","is","used","to","place","all","the","partitions","to","different","TPU","infeed","queues",".","host_id",":","The","id","of","the","host","machine",".","input_partition_dims",":","A","nested","list\/tuple","of","integers",".","Each","inner","list\/tuple","describes","how","to","partition","the","corresponding","input","tensor",".","tuple_types",":","If","not","None",",","a","list","of","types","of","the","elements","of","the","queue",".","tuple_shapes",":","If","not","None",",","a","list","of","shapes","of","the","elements","of","the","queue",".","name",":","The","name","of","the","queue","."]
code: def __init__(
      self,
      number_of_tuple_elements,
      device_assignment,
      host_id,
      input_partition_dims=None,
      tuple_types=None,
      tuple_shapes=None,
      name=None,
  ):
      super(_PartitionedInfeedQueue, self).__init__(
          number_of_tuple_elements=number_of_tuple_elements,
          tuple_types=tuple_types,
          tuple_shapes=None,
          shard_dimensions=None,
          name="PartitionedInfeedQueue" if name is None else name,
      )
      self._input_partition_dims = input_partition_dims
      self._host_id = host_id
      self._device_assignment = device_assignment
  
imports: import itertools
  import numpy
  from tensorflow.python.compiler.xla.experimental import xla_sharding
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import tensor_shape
  from tensorflow.python.ops import array_ops
  from tensorflow.python.tpu import tpu_name_util
  from tensorflow.python.tpu import tpu_sharding
  from tensorflow.python.tpu.ops import tpu_ops
  from tensorflow.python.util import nest
label_desc: Use image node_id 1 to create a new _PartitionedInfeedQueue object from inherited base classes: InfeedQueue with example: obj = _PartitionedInfeedQueue(number_of_tuple_elements, device_assignment, host_id, input_partition_dims, tuple_types, tuple_shapes, name)