def get_analyzers_fingerprint(
    graph: tf.Graph, structured_inputs: Mapping[str, common_types.TensorType]
) -> Mapping[str, AnalyzersFingerprint]:
  """Computes fingerprints for all analyzers in `graph`.

  Args:
    graph: a TF Graph.
    structured_inputs: a dict from keys to batches of placeholder graph tensors.

  Returns:
    A mapping from analyzer name to a set of paths that define its fingerprint.
  """
  result = {}
  tensor_sinks = graph.get_collection(analyzer_nodes.ALL_REPLACEMENTS)
  # The value for the keys in this dictionary are unused and can be arbitrary.
  sink_tensors_ready = {
      tf_utils.hashable_tensor_or_op(tensor_sink.tensor): False
      for tensor_sink in tensor_sinks
  }
  graph_analyzer = InitializableGraphAnalyzer(
      graph, structured_inputs, list(sink_tensors_ready.items()),
      describe_path_as_analyzer_cache_hash)
  for tensor_sink in tensor_sinks:
    # Retrieve tensors that are inputs to the analyzer's value node.
    visitor = SourcedTensorsVisitor()
    nodes.Traverser(visitor).visit_value_node(tensor_sink.future)
    source_keys = _retrieve_source_keys(visitor.sourced_tensors,
                                        structured_inputs)
    paths = set()
    for tensor in visitor.sourced_tensors:
      # Obtain fingerprint for each tensor that is an input to the value node.
      path = graph_analyzer.get_unique_path(tensor)
      if path is not None:
        paths.add(path)
    result[str(tensor_sink.tensor.name)] = AnalyzersFingerprint(
        source_keys, paths)
  return result
Computes fingerprints for all analyzers in `graph`.

  Args:
    graph: a TF Graph.
    structured_inputs: a dict from keys to batches of placeholder graph tensors.

  Returns:
    A mapping from analyzer name to a set of paths that define its fingerprint.
  
tensorflow_transform/graph_tools.py