code: def get_profiler_hook(
      model_dir, save_steps=1000, **kwargs
  ):  # pylint: disable=unused-argument
      """Function to get ProfilerHook.
  
      Args:
        model_dir: The directory to save the profile traces to.
        save_steps: `int`, print profile traces every N steps.
        **kwargs: a dictionary of arguments to ProfilerHook.
  
      Returns:
        Returns a ProfilerHook that writes out timelines that can be loaded into
        profiling tools like chrome://tracing.
      """
      return tf.estimator.ProfilerHook(
          save_steps=save_steps, output_dir=model_dir
      )
  
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 3 for calling a global function with example usage: get_profiler_hook(model_dir, save_steps) and returns: tf