def get_tensor_schema_override(
    tensor: common_types.TensorType) -> Tuple[tf.Tensor, tf.Tensor]:
  """Lookup schema overrides for a `Tensor`  or `CompositeTensor`."""
  tensor = _get_tensor_values(tensor)
  overrides = _get_tensor_ranges(tensor.graph)
  min_max = overrides.get(tf_utils.hashable_tensor_or_op(tensor), None)
  if min_max is None:
    raise ValueError('Requested tensor does not have recorded min/max values')
  return min_max
Lookup schema overrides for a `Tensor`  or `CompositeTensor`.
tensorflow_transform/schema_inference.py