code: def get_examples_per_second_hook(
      every_n_steps=100, batch_size=128, warm_steps=5, **kwargs
  ):  # pylint: disable=unused-argument
      """Function to get ExamplesPerSecondHook.
  
      Args:
        every_n_steps: `int`, print current and average examples per second every
          N steps.
        batch_size: `int`, total batch size used to calculate examples/second from
          global time.
        warm_steps: skip this number of steps before logging and running average.
        **kwargs: a dictionary of arguments to ExamplesPerSecondHook.
  
      Returns:
        Returns a ProfilerHook that writes out timelines that can be loaded into
        profiling tools like chrome://tracing.
      """
      return hooks.ExamplesPerSecondHook(
          batch_size=batch_size,
          every_n_steps=every_n_steps,
          warm_steps=warm_steps,
          metric_logger=logger.get_benchmark_logger(),
      )
  
file_path: autodist/examples/benchmark/utils/logs/hooks_helper.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import tensorflow
  from utils.logs import hooks
  from utils.logs import logger
  from utils.logs import metric_hook
label_desc: Use image node_id 4 for calling a global function with example usage: get_examples_per_second_hook(every_n_steps, batch_size, warm_steps) and returns: hooks