code: def sum(input, labels=None, index=None):
      """
      Calculate the sum of the values of the array.
  
      Notes
      -----
      This is an alias for `ndimage.sum_labels` kept for backwards compatibility
      reasons, for new code please prefer `sum_labels`.  See the `sum_labels`
      docstring for more details.
  
      """
      return sum_labels(input, labels, index)
  
imports: import numpy
  import numpy
  from .None import _ni_support
  from .None import _ni_label
  from .None import _nd_image
  from .None import _morphology
label_desc: Use image node_id 7 for calling a global function with example usage: sum(input, labels, index) and returns: sum_labels