def _get_asset_analyzer_output_and_control_dependency(
    asset_filepath: _AssetFileType
) -> Tuple[_AssetFileType, Optional[tf.Tensor]]:
  """Returns a tuple of (asset filepath, control dependency)."""
  control_dependency = None
  asset_replacements_coll = ops.get_default_graph().get_collection(
      _ASSET_REPLACEMENTS)
  if not asset_replacements_coll:
    return asset_filepath, control_dependency

  if not isinstance(asset_filepath, tf.Tensor):
    raise ValueError('Expected asset_filepath ({}) to be a tf.Tensor.'.format(
        asset_filepath))
  eager_asset_filepath = dict(asset_replacements_coll).get(
      hashable_tensor_or_op(asset_filepath), None)
  if eager_asset_filepath:
    control_dependency = asset_filepath
    asset_filepath = eager_asset_filepath
  return asset_filepath, control_dependency
Returns a tuple of (asset filepath, control dependency).
tensorflow_transform/tf_utils.py