code: def test_shift_ratio():
      f = np.zeros((128, 128))
      f[32:64, 32:64] = 128
      for s in [0, 1, 2, 3]:
          output = interpolate.shift(f, (s, s))
          ratio = output.sum() / f.sum()
          assert np.abs(ratio - 1.0) < 0.01
  
file_path: mahotas/mahotas/tests/test_interpolate.py
imports: from mahotas import interpolate
  import numpy
  import pytest
  from pytest import raises
label_desc: Use image node_id 5 for calling a global function with example usage: test_shift_ratio() without return types