code: def split_tensor_value(
      tensor_value: types.TensorValue,
  ) -> List[types.TensorValue]:
      """Split a single batch of Tensor values into a list of Tensor values.
  
      Args:
        tensor_value: A single Tensor value that represents a batch of Tensor
          values. The zeroth dimension should be batch size.
  
      Returns:
        A list of Tensor values, one per element of the zeroth dimension.
  
      Raises:
        TypeError: tensor_value had unknown type.
      """
      if isinstance(tensor_value, tf.compat.v1.SparseTensorValue):
          return _sparse_slice_rows(tensor_value)
      elif isinstance(
          tensor_value, tf.compat.v1.ragged.RaggedTensorValue
      ):
          return tensor_value.to_list()
      elif isinstance(tensor_value, np.ndarray):
          if tensor_value.shape[0] != 0:
              return np.split(
                  tensor_value,
                  indices_or_sections=tensor_value.shape[0],
                  axis=0,
              )
          else:
              # The result value's shape must match the shape of `tensor_value`.
              return np.zeros_like(tensor_value)
      else:
          raise TypeError(
              "tensor_value had unknown type: %s, value was: %s"
              % (type(tensor_value), tensor_value)
          )
  
file_path: model-analysis/tensorflow_model_analysis/eval_saved_model/util.py
imports: from typing import Any, Callable, List, Optional, Tuple
  import numpy
  import tensorflow
  from tensorflow import estimator
  from tensorflow_model_analysis.api import types
  from tensorflow_model_analysis.utils import util
  from tensorflow.core.example import example_pb2
label_desc: Use image node_id 9 for calling a global function with example usage: split_tensor_value(tensor_value) and returns: _sparse_slice_rows, tensor_value, np, np