code: def _run_function(user_fn, iters):
      """Run a function and report timing.
  
      Args:
        user_fn: A callable function of zero arguments.
        iters: Number of times to run `user_fn`.
  
      Returns:
        first_iter_time: Time (in seconds) to run the first iteration.
        total_time: Time (in seconds) to run all `iters` iterations.
      """
      start_time = time.time()
  
      for i in range(iters):
          _ = user_fn()
          if i == 0:
              first_iter_time = time.time() - start_time
  
      total_time = time.time() - start_time
      return first_iter_time, total_time
  
file_path: probability/tensorflow_probability/python/debugging/benchmarking/benchmark_tf_function.py
imports: import collections
  import pprint
  import time
  import tensorflow.compat.v2
label_desc: Use image node_id 2 for calling a global function with example usage: _run_function(user_fn, iters) and returns: first_iter_time,  total_time