code: def log_cosh(x, name=None):
      """Compute `log(cosh(x))` in a numerically stable way.
  
      Args:
        x: Float `Tensor`.
        name: Python `str` name prefixed to Ops created by this function.
          Default value: `None` (i.e., `'log_cosh'`).
  
      Returns:
        log_cosh: `log_cosh(x)`.
      """
      with tf.name_scope(name or "log_cosh"):
          dtype = dtype_util.common_dtype([x], dtype_hint=tf.float32)
          x = tf.convert_to_tensor(x, dtype=dtype, name="x")
          return _log_cosh_custom_gradient(x)
  
imports: import collections
  import functools
  import numpy
  import tensorflow.compat.v2
  from tensorflow_probability.python.internal import custom_gradient
  from tensorflow_probability.python.internal import distribute_lib
  from tensorflow_probability.python.internal import dtype_util
  from tensorflow_probability.python.internal import prefer_static
  from tensorflow_probability.python.internal import tensorshape_util
  from tensorflow_probability.python.internal import variadic_reduce
  from tensorflow_probability.python.math.scan_associative import scan_associative
  from tensorflow.python.util import deprecation
label_desc: Use image node_id 20 for calling a global function with example usage: log_cosh(x, name) and returns: _log_cosh_custom_gradient