code: def get_logging_metric_hook(
      tensors_to_log=None, every_n_secs=600, **kwargs
  ):  # pylint: disable=unused-argument
      """Function to get LoggingMetricHook.
  
      Args:
        tensors_to_log: List of tensor names or dictionary mapping labels to tensor
          names. If not set, log _TENSORS_TO_LOG by default.
        every_n_secs: `int`, the frequency for logging the metric. Default to every
          10 mins.
        **kwargs: a dictionary of arguments.
  
      Returns:
        Returns a LoggingMetricHook that saves tensor values in a JSON format.
      """
      if tensors_to_log is None:
          tensors_to_log = _TENSORS_TO_LOG
      return metric_hook.LoggingMetricHook(
          tensors=tensors_to_log,
          metric_logger=logger.get_benchmark_logger(),
          every_n_secs=every_n_secs,
      )
  
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 5 for calling a global function with example usage: get_logging_metric_hook(tensors_to_log, every_n_secs) and returns: metric_hook