code: def cumsum_quadrant(x, i_forwards, j_forwards):
      """Return the cumulative sum going in the i, then j direction
  
      x - the matrix to be summed
      i_forwards - sum from 0 to end in the i direction if true
      j_forwards - sum from 0 to end in the j direction if true
      """
      if i_forwards:
          x = x.cumsum(0)
      else:
          x = np.flipud(np.flipud(x).cumsum(0))
      if j_forwards:
          return x.cumsum(1)
      else:
          return np.fliplr(np.fliplr(x).cumsum(1))
  
imports: import numpy
  import scipy.ndimage
  import scipy.sparse
  from centrosome.filter import stretch
  from scipy.fftpack import fft2, ifft2
  from ..constants.measurement import COLTYPE_INTEGER
  from ..image import Image
  from ..module import Module
  from ..setting import Divider, SettingsGroup
  from ..setting.choice import Choice
  from ..setting.do_something import DoSomething, RemoveSettingButton
  from ..setting.subscriber import ImageSubscriber
  from ..setting.text import ImageName
label_desc: Use image node_id 2 for calling a global function with example usage: cumsum_quadrant(x, i_forwards, j_forwards) and returns: x, np