code: def _to_str(x):
      """Converts a bool tensor to a string with True/False values."""
      x = tf.convert_to_tensor(x)
      if x.dtype == tf.bool:
          return tf.where(x, "True", "False")
      return x
  
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 8 for calling a global function with example usage: _to_str(x) and returns: x, tf