def _get_tensor_ranges(graph):
  """Lookup overrides for `Tensor`s  or `SparseTensor`s."""
  tensors = graph.get_collection(_TF_METADATA_TENSOR_COLLECTION)
  min_values = graph.get_collection(_TF_METADATA_TENSOR_MIN_COLLECTION)
  max_values = graph.get_collection(_TF_METADATA_TENSOR_MAX_COLLECTION)
  assert len(tensors) == len(min_values), '{} != {}'.format(tensors, min_values)
  assert len(tensors) == len(max_values), '{} != {}'.format(tensors, max_values)
  return dict(
      zip(
          map(tf_utils.hashable_tensor_or_op, tensors),
          zip(min_values, max_values)))
Lookup overrides for `Tensor`s  or `SparseTensor`s.
tensorflow_transform/schema_inference.py