code: def _reduce_logsumexp(
      input_tensor, axis=None, keepdims=False, name=None
  ):  # pylint: disable=unused-argument
      """Computes `log(sum(exp(input_tensor))) along the specified axis."""
      input_tensor = _convert_to_tensor(input_tensor)
      dtype = input_tensor.dtype
      if not (
          np.issubdtype(dtype, np.floating)
          or np.issubdtype(dtype, np.complexfloating)
      ):
          # Match TF error
          raise TypeError("Input must be either real or complex")
      if input_tensor.size == 0:
          # On empty arrays, mimic TF in returning `-inf` instead of failing, and
          # preserve error message if `axis` arg is incompatible with an empty array.
          return _alt_reduce_logsumexp(
              input_tensor, axis=axis, keepdims=keepdims
          )
      try:
          return scipy_special.logsumexp(
              input_tensor, axis=_astuple(axis), keepdims=keepdims
          )
      except NotImplementedError:
          # We offer a non SP version just in case SP isn't installed and this
          # because logsumexp is often used.
          return _alt_reduce_logsumexp(
              input_tensor, axis=axis, keepdims=keepdims
          )
  
imports: import collections
  import functools
  import numpy
  import numpy
  from tensorflow_probability.python.internal.backend.numpy import _utils
  from tensorflow_probability.python.internal.backend.numpy.numpy_array import _reverse
  from tensorflow_probability.python.internal.backend.numpy.numpy_array import one_hot
  from tensorflow_probability.python.internal.backend.numpy.ops import _convert_to_tensor
label_desc: Use image node_id 21 for calling a global function with example usage: _reduce_logsumexp(input_tensor, axis, keepdims, name) and returns: _alt_reduce_logsumexp, scipy_special, _alt_reduce_logsumexp