code: def test_handles_precomputed_distance_matrices(self):
      x = np.random.normal(0, 1, (200, 5))
      d = squareform(pdist(x))
  
      for method_name, cls in AFFINITY_CLASSES:
          aff = cls(d, metric="precomputed")
          self.assertIsInstance(
              aff.knn_index,
              nearest_neighbors.PrecomputedDistanceMatrix,
              msg=method_name,
          )
  
imports: import logging
  import unittest
  from functools import partial
  import numpy
  from scipy.spatial.distance import squareform, pdist
  from sklearn import datasets
  from sklearn.model_selection import train_test_split
  from openTSNE import affinity, nearest_neighbors
label_desc: Use image node_id 4 for calling the TestAffinityMatrixCorrectness obj's underlying member method code with example usage: obj.test_handles_precomputed_distance_matrices() without return types