parameters: (self, tensors)
return_statement: return nest.map_structure(self._pack_tensor, *tensors,
                                expand_composites=True)
docstring: Create a tensor on the parallel device from a sequence of tensors.
  
      Args:
        tensors: A list of tensors, one per device in `self.components`. The list
          can contain composite tensors and nests (lists, dicts, etc. supported by
          `tf.nest`) with the same structure for each device, but every component
          of nests must already be a `tf.Tensor` or composite. Passing
          `tf.Variable` objects reads their value, it does not share a mutable
          reference between the packed and unpacked forms.
  
      Returns:
        A tensor placed on the ParallelDevice. For nested structures, returns a
        single structure containing tensors placed on the ParallelDevice (same
        structure as each component of `tensors`).
  
      Raises:
        ValueError: If the length of `tensors` does not match the number of
          component devices, or if there are non-tensor inputs.
docstring_summary: Create a tensor on the parallel device from a sequence of tensors.
docstring_tokens: Create a tensor on the parallel device from a sequence of tensors .
function: def pack(self, tensors):
      """Create a tensor on the parallel device from a sequence of tensors.
  
      Args:
        tensors: A list of tensors, one per device in `self.components`. The list
          can contain composite tensors and nests (lists, dicts, etc. supported by
          `tf.nest`) with the same structure for each device, but every component
          of nests must already be a `tf.Tensor` or composite. Passing
          `tf.Variable` objects reads their value, it does not share a mutable
          reference between the packed and unpacked forms.
  
      Returns:
        A tensor placed on the ParallelDevice. For nested structures, returns a
        single structure containing tensors placed on the ParallelDevice (same
        structure as each component of `tensors`).
  
      Raises:
        ValueError: If the length of `tensors` does not match the number of
          component devices, or if there are non-tensor inputs.
  
      """
      self._assert_eager()
      if len(tensors) != len(self.components):
        raise ValueError(
            ("Creating a parallel tensor requires one tensor per component. "
             "Got {} but was expecting {}.")
            .format(len(tensors), len(self.components)))
      return nest.map_structure(self._pack_tensor, *tensors,
                                expand_composites=True)
function_tokens: def pack ( self , tensors ) : self . _assert_eager ( ) if len ( tensors ) != len ( self . components ) : raise ValueError ( ( "Creating a parallel tensor requires one tensor per component. " "Got {} but was expecting {}." ) . format ( len ( tensors ) , len ( self . components ) ) ) return nest . map_structure ( self . _pack_tensor , * tensors , expand_composites = True )