def _format_output_cache(
    cache_value_nodes: _IntermediateCacheType,
) -> Optional[AnalysisCache]:
  """Triggers dataset cache encoding and composes analysis cache output."""
  if cache_value_nodes is None:
    return None
  cache_dict = collections.defaultdict(dict)
  for (dataset_key, cache_key), value_node in cache_value_nodes.items():
    cache_dict[dataset_key][cache_key] = value_node
  return cache_dict
Triggers dataset cache encoding and composes analysis cache output.
tensorflow_transform/beam/analysis_graph_builder.py