code: def test_nn_filter_mean_rec_sparse():
      srand()
      X = np.random.randn(10, 100)
  
      # Build a recurrence matrix, just for testing purposes
      rec = librosa.segment.recurrence_matrix(X, sparse=True)
  
      X_filtered = librosa.decompose.nn_filter(X, rec=rec)
  
      # Normalize the recurrence matrix
      rec = librosa.util.normalize(
          rec.toarray().astype(float), axis=0, norm=1
      )
      assert np.allclose(X_filtered, (X.dot(rec)))
  
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 16 for calling a global function with example usage: test_nn_filter_mean_rec_sparse() without return types