code: def mean(a, axes=None):
      """Calculates mean of blob elements along provided axes.
      If axes=None calculates the total mean.
      """
      if not type(a) is Blob:
          raise ValueError("`a` should be neoml.Blob.")
  
      if a.size == 0:
          raise ValueError("The blob shouldn't be empty.")
  
      axes = numpy.array(
          [] if axes is None else axes, dtype=numpy.int32
      )
      if not neoml.Utils.check_axes(axes):
          raise ValueError(
              "`axes` should be unique and in range [0, 6]."
          )
  
      return Blob(PythonWrapper.blob_mean(a._internal, axes))
  
imports: import neoml
  import neoml.PythonWrapper
  from neoml.MathEngine import MathEngine
  from neoml.Blob import Blob
  import numpy
label_desc: Use image node_id 9 for calling a global function with example usage: mean(a, axes) and returns: Blob