code: def test_nn_filter_multi(s_multi, useR, sparse):
      R = librosa.segment.recurrence_matrix(
          s_multi, mode="affinity", sparse=sparse
      )
      if useR:
          R_multi = R
      else:
          R_multi = None
  
      s_filt = librosa.decompose.nn_filter(
          s_multi, rec=R_multi, mode="affinity", sparse=sparse
      )
      # Always use the same recurrence matrix for comparison
      s_filt0 = librosa.decompose.nn_filter(s_multi[0], rec=R)
      s_filt1 = librosa.decompose.nn_filter(s_multi[1], rec=R)
  
      assert np.allclose(s_filt[0], s_filt0)
      assert np.allclose(s_filt[1], s_filt1)
      assert not np.allclose(s_filt0, s_filt1)
  
imports: import os
  import numpy
  import scipy.sparse
  import librosa
  import sklearn.decomposition
  import pytest
  from test_core import srand
label_desc: Use image node_id 18 for calling a global function with example usage: test_nn_filter_multi(s_multi, useR, sparse) without return types