code: def _mean_out(img, axis):
      if len(img.shape) == 2:
          return img.mean(1 - axis)
      if axis == 0:
          return _mean_out(img.mean(1), 0)
      return _mean_out(img.mean(0), axis - 1)
  
file_path: mahotas/mahotas/tests/test_center_of_mass.py
imports: import numpy
  from scipy import ndimage
  import mahotas.center_of_mass
label_desc: Use image node_id 1 for calling a global function with example usage: _mean_out(img, axis) and returns: _mean_out, img, _mean_out