code: def test_repetitive_monitored_timer(self):
      counter = monitoring.Counter(
          "test/ctxmgr", "test context manager"
      )
      with monitoring.MonitoredTimer(
          counter.get_cell(),
          monitored_section_name="action1",
          avoid_repetitive_counting=True,
      ):
          time.sleep(1)
          with monitoring.MonitoredTimer(
              counter.get_cell(),
              monitored_section_name="action1",
              avoid_repetitive_counting=True,
          ):
              time.sleep(1)
  
          # The inner section is not timed.
          self.assertEqual(counter.get_cell().value(), 0)
  
      self.assertGreater(counter.get_cell().value(), 0)
  
file_path: tensorflow/tensorflow/python/eager/monitoring_test.py
imports: import time
  from tensorflow.python.eager import monitoring
  from tensorflow.python.eager import test
  from tensorflow.python.framework import test_util
label_desc: Use image node_id 10 for calling the MonitoringTest obj's underlying member method code with example usage: obj.test_repetitive_monitored_timer() without return types