class_docstr: Main micro benchmark class.
docstr: Run fn repeat * number times, report time, and return fastest time.
docstr_tok: ["Run","fn","repeat","*","number","times",",","report","time",",","and","return","fastest","time","."]
code: def _benchmark_and_report(self, name, fn, repeat=None, number=None):
      """Run fn repeat * number times, report time, and return fastest time."""
      # Can't make these default above since the flags may not have been parsed
      # at module import time.
      repeat = repeat or int(FLAGS.repeat)
      number = number or int(FLAGS.number)
  
      # Warmup
      fn()
  
      times = []
      for _ in range(repeat):
          gc.disable()
          start = time.time()
          for _ in range(number):
              fn()
          times.append(time.time() - start)
          gc.enable()
          gc.collect()
  
      # Regular benchmark to report numbers.
      fastest_time_us = min(times) * 1e6 / number
      total_time = sum(times)
      self.report_benchmark(
          name=name,
          wall_time=total_time,
          extras={"fastest_time_us": fastest_time_us},
      )
  
      return fastest_time_us
  
imports: import gc
  import time
  from absl import flags
  from absl import logging
  import numpy
  import tensorflow.compat.v2
  from tensorflow.python.ops.numpy_ops.integration_test.benchmarks import numpy_mlp
  from tensorflow.python.ops.numpy_ops.integration_test.benchmarks import tf_numpy_mlp
label_desc: Use image node_id 1 for calling the MicroBenchmarks obj's underlying member method code with example usage: obj._benchmark_and_report(name, fn, repeat, number) and returns: fastest_time_us