code: def test_soft_threhold():
      from mahotas.thresholding import soft_threshold
  
      np.random.seed(223)
      for i in range(4):
          f = np.random.randint(-256, 256, size=(128, 128, 4))
          fo = f.copy()
          t = soft_threshold(f, 16)
  
          assert not np.all(fo == t)
          assert np.all(t[np.abs(f) < 16] == 0)
          assert t.max() == f.max() - 16
          assert t.min() == f.min() + 16
          assert np.all(
              (np.abs(f) <= 16) | (np.abs(f) - 16 == np.abs(t))
          )
  
file_path: mahotas/mahotas/tests/test_thresholding.py
imports: import numpy
  from mahotas.thresholding import otsu, rc, bernsen, gbernsen
  from mahotas.histogram import fullhistogram
  import pytest
label_desc: Use image node_id 7 for calling a global function with example usage: test_soft_threhold() without return types