def _validate_analyzers_fingerprint(
    baseline_analyzers_fingerprint: Mapping[
        str, graph_tools.AnalyzersFingerprint
    ],
    graph: tf.Graph,
    structured_inputs: Mapping[str, common_types.TensorType],
):
  """Validates analyzers fingerprint in `graph` is same as baseline."""
  analyzers_fingerprint = graph_tools.get_analyzers_fingerprint(
      graph, structured_inputs
  )
  error_msg = (
      'The order of analyzers in your `preprocessing_fn` appears to be '
      'non-deterministic. This can be fixed either by changing your '
      '`preprocessing_fn` such that tf.Transform analyzers are encountered '
      'in a deterministic order or by passing a unique name to each '
      'analyzer API call.'
  )
  for analyzer in analyzers_fingerprint:
    if analyzer not in baseline_analyzers_fingerprint:
      prefix_msg = (
          f'Analyzer node ({analyzer}) not found in '
          f'{baseline_analyzers_fingerprint.keys()}. '
      )
      raise RuntimeError(prefix_msg + error_msg)
    if (
        baseline_analyzers_fingerprint[analyzer].source_keys
        != analyzers_fingerprint[analyzer].source_keys
    ):
      raise RuntimeError(error_msg)

    if (
        baseline_analyzers_fingerprint[analyzer].unique_path_hash
        != analyzers_fingerprint[analyzer].unique_path_hash
    ):
      logging.warning(
          "Analyzer (%s) node's cache key varies on repeated tracing."
          ' This warning is safe to ignore if you either specify `name` for all'
          ' analyzers or if the order in which they are invoked is'
          ' deterministic. If not, please file a bug with details.',
          analyzer,
      )
Validates analyzers fingerprint in `graph` is same as baseline.
tensorflow_transform/impl_helper.py