code: def moments(image, order=3, *, spacing=None):
      """Calculate all raw image moments up to a certain order.
  
      The following properties can be calculated from raw image moments:
       * Area as: ``M[0, 0]``.
       * Centroid as: {``M[1, 0] / M[0, 0]``, ``M[0, 1] / M[0, 0]``}.
  
      Note that raw moments are neither translation, scale nor rotation
      invariant.
  
      Parameters
      ----------
      image : (N[, ...]) double or uint8 array
          Rasterized shape as image.
      order : int, optional
          Maximum order of moments. Default is 3.
      spacing: tuple of float, shape (ndim,)
          The pixel spacing along each axis of the image.
  
      Returns
      -------
      m : (``order + 1``, ``order + 1``) array
          Raw image moments.
  
      References
      ----------
      .. [1] Wilhelm Burger, Mark Burge. Principles of Digital Image Processing:
             Core Algorithms. Springer-Verlag, London, 2009.
      .. [2] B. Jähne. Digital Image Processing. Springer-Verlag,
             Berlin-Heidelberg, 6. edition, 2005.
      .. [3] T. H. Reiss. Recognizing Planar Objects Using Invariant Image
             Features, from Lecture notes in computer science, p. 676. Springer,
             Berlin, 1993.
      .. [4] https://en.wikipedia.org/wiki/Image_moment
  
      Examples
      --------
      >>> image = np.zeros((20, 20), dtype=np.float64)
      >>> image[13:17, 13:17] = 1
      >>> M = moments(image)
      >>> centroid = (M[1, 0] / M[0, 0], M[0, 1] / M[0, 0])
      >>> centroid
      (14.5, 14.5)
      """
      return moments_central(
          image, (0,) * image.ndim, order=order, spacing=spacing
      )
  
file_path: scikit-image/skimage/measure/_moments.py
imports: import itertools
  import numpy
  from .._shared.utils import _supported_float_type, check_nD
  from .None import _moments_cy
  from ._moments_analytical import moments_raw_to_central
label_desc: Use image node_id 3 for calling a global function with example usage: moments(image, order) and returns: moments_central