code: def test_checkpoint_add_read_duration(self):
      self.assertEqual(
          self._get_histogram_proto(
              metrics.GetCheckpointReadDurations(api_label="bar")
          ).num,
          0,
      )
  
      metrics.AddCheckpointReadDuration(
          api_label="bar", microseconds=200
      )
      metrics.AddCheckpointReadDuration(
          api_label="bar", microseconds=20000
      )
  
      self.assertEqual(
          self._get_histogram_proto(
              metrics.GetCheckpointReadDurations(api_label="bar")
          ).num,
          2,
      )
      self.assertEqual(
          self._get_histogram_proto(
              metrics.GetCheckpointReadDurations(api_label="bar")
          ).min,
          200,
      )
      self.assertEqual(
          self._get_histogram_proto(
              metrics.GetCheckpointReadDurations(api_label="bar")
          ).max,
          20000,
      )
  
imports: import os
  from tensorflow.core.framework import summary_pb2
  from tensorflow.core.framework import versions_pb2
  from tensorflow.core.protobuf import fingerprint_pb2
  from tensorflow.python.eager import test
  from tensorflow.python.saved_model.pywrap_saved_model import metrics
label_desc: Use image node_id 7 for calling the MetricsTest obj's underlying member method code with example usage: obj.test_checkpoint_add_read_duration() without return types