def exported_as_v1(transform_savedmodel_dir):
  """Check if a SavedModel was exported as a TF 1 model or not.

  Args:
    transform_savedmodel_dir: a SavedModel directory.

  Returns:
    `True` if `transform_savedmodel_dir` contains a TF1 SavedModel else
    returns `False`.
  """
  saved_model = saved_model_loader.parse_saved_model(transform_savedmodel_dir)
  meta_graph_def = saved_model_loader.choose_meta_graph_def(saved_model)
  return meta_graph_def is not None
Check if a SavedModel was exported as a TF 1 model or not.

  Args:
    transform_savedmodel_dir: a SavedModel directory.

  Returns:
    `True` if `transform_savedmodel_dir` contains a TF1 SavedModel else
    returns `False`.
  
tensorflow_transform/saved/saved_transform_io.py