class_docstr: A device which executes operations in parallel.
class_docstr_tok: ["A","device","which","executes","operations","in","parallel","."]
docstr: Helper to pack plain-old-tensors, not structures or composites.
docstr_tok: ["Helper","to","pack","plain-old-tensors",",","not","structures","or","composites","."]
code: def _pack_tensor(self, *tensors):
      """Helper to pack plain-old-tensors, not structures or composites."""
      for tensor in tensors:
          if not isinstance(
              tensor,
              (
                  tensor_lib.Tensor,
                  composite_tensor.CompositeTensor,
                  variables.Variable,
              ),
          ):
              raise ValueError(
                  (
                      "Every component to pack onto the ParallelDevice must already be "
                      "a tensor, got {}. Consider running `tf.constant` or "
                      "`tf.convert_to_tensor` first on literal values."
                  ).format(tensors)
              )
      with ops.device(self._name):
          return tpu_ops.tpu_replicated_input(inputs=tensors)
  
imports: import threading
  import weakref
  from tensorflow.python import _pywrap_parallel_device
  from tensorflow.python.distribute import device_util
  from tensorflow.python.eager import context
  from tensorflow.python.framework import composite_tensor
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import tensor
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import variables
  from tensorflow.python.tpu.ops import tpu_ops
  from tensorflow.python.util import nest
  from tensorflow.python.util import variable_utils
label_desc: Use image node_id 2 for calling the ParallelDevice obj's underlying member method code with example usage: obj._pack_tensor() and returns: tpu_ops