code: def test_recurrence_distance(self):
      srand()
      data = np.random.randn(3, 100)
      distance = squareform(pdist(data.T, metric="sqeuclidean"))
      rec = librosa.segment.recurrence_matrix(
          data,
          mode="distance",
          metric="sqeuclidean",
          sparse=True,
          self=self,
      )
  
      i, j, vals = scipy.sparse.find(rec)
      assert np.allclose(vals, distance[i, j])
      assert np.allclose(rec.diagonal(), 0.0)
  
imports: from typing import Union
  import warnings
  import os
  import numpy
  import scipy
  from scipy.spatial.distance import cdist, pdist, squareform
  import pytest
  from test_core import srand
  import librosa
label_desc: Use image node_id 13 for calling a global function with example usage: test_recurrence_distance() without return types