code: def get_logging_tensor_hook(
      every_n_iter=100, tensors_to_log=None, **kwargs
  ):  # pylint: disable=unused-argument
      """Function to get LoggingTensorHook.
  
      Args:
        every_n_iter: `int`, print the values of `tensors` once every N local
          steps taken on the current worker.
        tensors_to_log: List of tensor names or dictionary mapping labels to tensor
          names. If not set, log _TENSORS_TO_LOG by default.
        **kwargs: a dictionary of arguments to LoggingTensorHook.
  
      Returns:
        Returns a LoggingTensorHook with a standard set of tensors that will be
        printed to stdout.
      """
      if tensors_to_log is None:
          tensors_to_log = _TENSORS_TO_LOG
  
      return tf.estimator.LoggingTensorHook(
          tensors=tensors_to_log, every_n_iter=every_n_iter
      )
  
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 2 for calling a global function with example usage: get_logging_tensor_hook(every_n_iter, tensors_to_log) and returns: tf