code: def test_sum_rect():
      f = np.arange(800 * 160).reshape((800, 160)) % 7
      fi = surf.integral(f.copy())
  
      np.random.seed(22)
      for i in range(100):
          y0 = np.random.randint(1, 780)
          y1 = np.random.randint(y0 + 1, 799)
          x0 = np.random.randint(1, 150)
          x1 = np.random.randint(x0 + 1, 159)
          assert (
              _surf.sum_rect(fi, y0, x0, y1, x1)
              == f[y0:y1, x0:x1].sum()
          )
  
file_path: mahotas/mahotas/tests/test_surf.py
imports: import numpy
  import mahotas
  import mahotas.features.surf
  from mahotas.features import _surf
  from .utils import luispedro_jpg
  import pytest
label_desc: Use image node_id 3 for calling a global function with example usage: test_sum_rect() without return types