code: def _mean(a, axis=None, dtype=None, out=None, keepdims=False):
      arr = asanyarray(a)
  
      is_float16_result = False
      rcount = _count_reduce_items(arr, axis)
      # Make this warning show up first
      if rcount == 0:
          warnings.warn(
              "Mean of empty slice.", RuntimeWarning, stacklevel=2
          )
  
      # Cast bool, unsigned int, and int to float64 by default
      if dtype is None:
          if issubclass(arr.dtype.type, (nt.integer, nt.bool_)):
              dtype = mu.dtype("f8")
          elif issubclass(arr.dtype.type, nt.float16):
              dtype = mu.dtype("f4")
              is_float16_result = True
  
      ret = umr_sum(arr, axis, dtype, out, keepdims)
      if isinstance(ret, mu.ndarray):
          ret = um.true_divide(
              ret, rcount, out=ret, casting="unsafe", subok=False
          )
          if is_float16_result and out is None:
              ret = arr.dtype.type(ret)
      elif hasattr(ret, "dtype"):
          if is_float16_result:
              ret = arr.dtype.type(ret / rcount)
          else:
              ret = ret.dtype.type(ret / rcount)
      else:
          ret = ret / rcount
  
      return ret
  
file_path: catboost/contrib/python/numpy/py2/numpy/core/_methods.py
imports: from __future__ import division, absolute_import, print_function
  import warnings
  from numpy.core import multiarray
  from numpy.core import umath
  from numpy.core.numeric import asanyarray
  from numpy.core import numerictypes
  from numpy._globals import _NoValue
label_desc: Use image node_id 8 for calling a global function with example usage: _mean(a, axis, dtype, out, keepdims) and returns: ret