code: def test_cooccurence_errors():
      f2 = np.zeros((6, 6), np.uint8)
      f3 = np.zeros((6, 6, 6), np.uint8)
      f4 = np.zeros((6, 6, 6, 6), np.uint8)
  
      with pytest.raises(ValueError):
          texture.cooccurence(f2, -2, distance=1)
  
      with pytest.raises(ValueError):
          texture.cooccurence(f3, -2, distance=1)
  
      with pytest.raises(ValueError):
          texture.cooccurence(f2, 10, distance=1)
  
      with pytest.raises(ValueError):
          texture.cooccurence(f3, 17, distance=1)
  
      with pytest.raises(ValueError):
          texture.cooccurence(f4, 1, distance=1)
  
imports: import numpy
  from mahotas.features import texture
  import mahotas
  import mahotas.features._texture
  import pytest
label_desc: Use image node_id 2 for calling a global function with example usage: test_cooccurence_errors() without return types