code: def cumsum(a, axis=0):
      """Calculates cumulative sum of blob elements along provided axis."""
      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.")
  
      if not neoml.Utils.check_axes(axis):
          raise ValueError("`axis` should be in range [0, 6].")
  
      return Blob(PythonWrapper.blob_cumsum(a._internal, int(axis)))
  
imports: import neoml
  import neoml.PythonWrapper
  from neoml.MathEngine import MathEngine
  from neoml.Blob import Blob
  import numpy
label_desc: Use image node_id 8 for calling a global function with example usage: cumsum(a, axis) and returns: Blob