code: def read_fingerprint(export_dir: str) -> Fingerprint:
      """Reads the fingerprint of a SavedModel in `export_dir`.
  
      Returns a `tf.saved_model.experimental.Fingerprint` object that contains
      the values of the SavedModel fingerprint, which is persisted on disk in the
      `fingerprint.pb` file in the `export_dir`.
  
      Read more about fingerprints in the SavedModel guide at
      https://www.tensorflow.org/guide/saved_model.
  
      Args:
        export_dir: The directory that contains the SavedModel.
  
      Returns:
        A `tf.saved_model.experimental.Fingerprint`.
  
      Raises:
        FileNotFoundError: If no or an invalid fingerprint is found.
      """
      try:
          fingerprint = fingerprinting_pywrap.ReadSavedModelFingerprint(
              export_dir
          )
      except fingerprinting_pywrap.FileNotFoundException as e:
          raise FileNotFoundError(
              f"SavedModel Fingerprint Error: {e}"
          ) from None  # pylint: disable=raise-missing-from
      except fingerprinting_pywrap.FingerprintException as e:
          raise RuntimeError(
              f"SavedModel Fingerprint Error: {e}"
          ) from None  # pylint: disable=raise-missing-from
      return Fingerprint.from_proto(
          fingerprint_pb2.FingerprintDef().FromString(fingerprint)
      )
  
file_path: tensorflow-upstream/tensorflow/python/saved_model/fingerprinting.py
imports: from typing import Any
  from tensorflow.core.protobuf import fingerprint_pb2
  from tensorflow.python.saved_model.pywrap_saved_model import fingerprinting
  from tensorflow.python.util.tf_export import tf_export
label_desc: Use image node_id 1 for calling a global function with example usage: read_fingerprint(export_dir) and returns: Fingerprint