code: def test_cooccurence():
      np.random.seed(222)
      f = np.random.rand(32, 32)
      f = (f * 255).astype(np.int32)
  
      assert np.all(
          texture.cooccurence(f, 0, distance=1, symmetric=False)
          == brute_force(f, 0, 1)
      )
      assert np.all(
          texture.cooccurence(f, 1, distance=1, symmetric=False)
          == brute_force(f, 1, 1)
      )
      assert np.all(
          texture.cooccurence(f, 2, distance=1, symmetric=False)
          == brute_force(f, 1, 0)
      )
      assert np.all(
          texture.cooccurence(f, 3, distance=1, symmetric=False)
          == brute_force(f, 1, -1)
      )
  
      assert np.all(
          texture.cooccurence(f, 0, distance=1, symmetric=1)
          == brute_force_sym(f, 0, 1)
      )
      assert np.all(
          texture.cooccurence(f, 1, distance=1, symmetric=1)
          == brute_force_sym(f, 1, 1)
      )
      assert np.all(
          texture.cooccurence(f, 2, distance=1, symmetric=1)
          == brute_force_sym(f, 1, 0)
      )
      assert np.all(
          texture.cooccurence(f, 3, distance=1, symmetric=1)
          == brute_force_sym(f, 1, -1)
      )
  
imports: import numpy
  from mahotas.features import texture
  import mahotas
  import mahotas.features._texture
  import pytest
label_desc: Use image node_id 6 for calling a global function with example usage: test_cooccurence() without return types