code: def flatten_values_tensors_or_sparse(tensors_list):
      """Flatten each SparseTensor object into 3 Tensors for session.run()."""
      return list(
          flatten(
              [
                  [v.indices, v.values, v.dense_shape]
                  if isinstance(v, sparse_tensor.SparseTensor)
                  else [v]
                  for v in tensors_list
              ]
          )
      )
  
imports: import itertools
  import numpy
  from tensorflow.core.example import example_pb2
  from tensorflow.core.example import feature_pb2
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import errors_impl
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import sparse_tensor
  from tensorflow.python.framework import tensor_shape
  from tensorflow.python.framework import test_util
  from tensorflow.python.ops import parsing_ops
  from tensorflow.python.platform import test
  from tensorflow.python.platform import tf_logging
label_desc: Use image node_id 3 for calling a global function with example usage: flatten_values_tensors_or_sparse(tensors_list) and returns: list