code: def sum(x, axis=None, keepdims=False):
      """Reduction along axes with sum operation.
  
      Args:
          x (Variable): An input variable.
          axis (None, int or tuple of ints): Axis or axes along which the sum is
              calculated. Passing the default value `None` will reduce all dimensions.
          keepdims (bool): Flag whether the reduced axes are kept as a dimension with 1 element.
  
      Returns:
          ~nnabla.Variable: N-D array.
      """
      from .function_bases import sum as sum_base
  
      if axis is None:
          axis = range(x.ndim)
      elif not hasattr(axis, "__iter__"):
          axis = [axis]
      return sum_base(x, axis, keepdims)
  
imports: from __future__ import absolute_import
  from .function_bases import *
  from .None import dtypes
  import nnabla
  import numpy
  from .normalization_functions import *
  from .numpy_compat_functions import *
label_desc: Use image node_id 1 for calling a global function with example usage: sum(x, axis, keepdims) and returns: sum_base