code: def pack_sequence_as(structure, flat_sequence):
      """Returns a given flattened sequence packed into a nest.
  
      If `structure` is a scalar, `flat_sequence` must be a single-element list;
      in this case the return value is `flat_sequence[0]`.
  
      Args:
        structure: tuple or list constructed of scalars and/or other tuples/lists,
          or a scalar.  Note: numpy arrays are considered scalars.
        flat_sequence: flat sequence to pack.
  
      Returns:
        packed: `flat_sequence` converted to have the same recursive structure as
          `structure`.
  
      Raises:
        ValueError: If nest and structure have different element counts.
      """
      return nest_util.pack_sequence_as(
          nest_util.Modality.DATA,
          structure,
          flat_sequence,
          expand_composites=False,
      )
  
file_path: tensorflow-upstream/tensorflow/python/data/util/nest.py
imports: from tensorflow.python.util import nest_util
label_desc: Use image node_id 4 for calling a global function with example usage: pack_sequence_as(structure, flat_sequence) and returns: nest_util