code: def test_correlate_sparse_invalid_kernel(mode):
      image = np.array(
          [
              [0, 0, 1, 3, 5],
              [0, 1, 4, 3, 4],
              [1, 2, 5, 4, 1],
              [2, 4, 5, 2, 1],
              [4, 5, 1, 0, 0],
          ],
          dtype=float,
      )
      # invalid kernel size
      invalid_kernel = np.array([0, 1, 2, 4]).reshape((2, 2))
      with pytest.raises(ValueError):
          correlate_sparse(image, invalid_kernel, mode=mode)
  
file_path: scikit-image/skimage/filters/tests/test_correlate.py
imports: import numpy
  import pytest
  from numpy.testing import assert_equal
  from scipy import ndimage
  from skimage._shared.utils import _supported_float_type
  from skimage.filters import correlate_sparse
label_desc: Use image node_id 3 for calling a global function with example usage: test_correlate_sparse_invalid_kernel(mode) without return types