code: def logsumexp(x, axis=None):
      """Log-sum-exp of array elements over a given axis.
  
      This function calculates logarithm of sum of exponential of array elements.
  
      .. math::
  
         y_i = \\log\\left(\\sum_j \\exp(x_{ij})\\right)
  
      Args:
          x (:class:`~chainer.Variable` or :ref:`ndarray`):
              Elements to log-sum-exp.
          axis (None, int, or tuple of int): Axis which a sum is performed.
              The default (axis = None) is perform a sum over all the dimensions
              of the input array.
  
      Returns:
          ~chainer.Variable: Output variable.
  
      """
      return LogSumExp(axis).apply((x,))[0]
  
file_path: chainer/chainer/functions/math/logsumexp.py
imports: import six
  import chainer
  from chainer import backend
  from chainer import function_node
  from chainer import utils
  from chainer.utils import type_check
  import chainerx
label_desc: Use image node_id 1 for calling a global function with example usage: logsumexp(x, axis) and returns: LogSumExp