code: def pack_tf_tensor(
      value: Tensor, layout: layout_lib.Layout
  ) -> Tensor:
      if value is None:
          raise ValueError("pack requires values to be passed in")
      unpacked = unpack(
          value,
          layout,
          split_fn=array_ops.split,
          stack_fn=array_ops_stack.stack,
      )
      return api.pack(unpacked, layout)
  
file_path: tensorflow-upstream/tensorflow/dtensor/python/numpy_util.py
imports: from typing import List
  import numpy
  from tensorflow.dtensor.python import api
  from tensorflow.dtensor.python import layout
  from tensorflow.python.eager.polymorphic_function import polymorphic_function
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import array_ops_stack
  from tensorflow.python.ops import sparse_ops
  from tensorflow.python.ops import stateless_random_ops
  from tensorflow.python.types.core import Tensor, TensorLike
label_desc: Use image node_id 6 for calling a global function with example usage: pack_tf_tensor(value, layout) and returns: api