code: def sum(x, axis=None, keepdims=False):
      """Sum of array elements over a given axis.
  
      Args:
          x (:class:`~chainer.Variable` or :ref:`ndarray`): Elements to sum.
              A :math:`(s_1, s_2, ..., s_N)` -shaped float array.
          axis (None, int, or tuple of int): Axis along which a sum is performed.
              The default (axis = None) is perform a sum over all the dimensions
              of the input array.
          keepdims (bool): If ``True``, the specified axes are remained as axes
              of length one.
  
      Returns:
          ~chainer.Variable: Output variable.
  
      .. admonition:: Example
  
          >>> x = np.arange(6).reshape(2,3).astype(np.float32)
          >>> x
          array([[0., 1., 2.],
                 [3., 4., 5.]], dtype=float32)
          >>> y = F.sum(x)
          >>> y.shape
          ()
          >>> y.array
          array(15., dtype=float32)
          >>> y = F.sum(x, axis=1)
          >>> y.shape
          (2,)
          >>> y.array
          array([ 3., 12.], dtype=float32)
          >>> y = F.sum(x, keepdims=True)
          >>> y.shape
          (1, 1)
          >>> y.array
          array([[15.]], dtype=float32)
  
      """
      (y,) = Sum(axis, keepdims).apply((x,))
      return y
  
imports: import numpy
  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: sum(x, axis, keepdims) and returns: y