code: def pack_numpy(
      value: np.ndarray,
      layout: layout_lib.Layout,
      make_sparse: bool = False,
  ) -> Tensor:
      assert value is not None
      unpacked = unpack(value, layout)
      if make_sparse:
          return api.pack(
              [sparse_ops.from_dense(t) for t in unpacked], layout
          )
      return api.pack(unpacked, layout)
  
file_path: tensorflow/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 5 for calling a global function with example usage: pack_numpy(value, layout, make_sparse) and returns: api, api