code: def test_lbp_transform():
      im = luispedro_jpg().max(2)
      transformed = lbp_transform(im, 8, 4, preserve_shape=True)
      assert transformed.shape == im.shape
      assert transformed.min() >= 0
      assert transformed.max() < 2**4
      transformed = lbp_transform(im, 8, 4, preserve_shape=False)
      assert len(transformed.shape) == 1
      assert transformed.size == im.size
  
      np.random.seed(234)
      im *= np.random.random(im.shape) > 0.1
      transformed = lbp_transform(
          im, 8, 4, preserve_shape=False, ignore_zeros=True
      )
      assert len(transformed.shape) == 1
      assert transformed.size == (im.size - (im == 0).sum())
  
file_path: mahotas/mahotas/tests/test_lbp.py
imports: import numpy
  from mahotas.features import _lbp
  import mahotas.thresholding
  from mahotas.features import lbp
  from mahotas.features.lbp import lbp_transform, lbp_names
  from mahotas.tests.utils import luispedro_jpg
  import pytest
label_desc: Use image node_id 7 for calling a global function with example usage: test_lbp_transform() without return types