code: def _print(pass_through_tensor, values):
      """Wrapper for tf.Print which supports lists and namedtuples for printing."""
      flat_values = []
      for value in values:
          # Checks if it is a namedtuple.
          if hasattr(value, "_fields"):
              for field in value._fields:
                  flat_values.extend(
                      [field, _to_str(getattr(value, field))]
                  )
              continue
          if isinstance(value, (list, tuple)):
              for v in value:
                  flat_values.append(_to_str(v))
              continue
          flat_values.append(_to_str(value))
      return tf.Print(pass_through_tensor, flat_values)
  
file_path: probability/tensorflow_probability/python/optimizer/linesearch/hager_zhang.py
imports: import collections
  import numpy
  import tensorflow.compat.v2
  from tensorflow_probability.python.internal import dtype_util
  from tensorflow_probability.python.internal import prefer_static
  from tensorflow_probability.python.optimizer.linesearch.internal import hager_zhang_lib
label_desc: Use image node_id 9 for calling a global function with example usage: _print(pass_through_tensor, values) and returns: tf