code: def test_affinity_with_queryable_knn_index(self):
      knn_index = nearest_neighbors.Sklearn(self.x, k=30)
      init = initialization.random(self.x, random_state=0)
  
      for aff in [
          affinity.PerplexityBasedNN(
              knn_index=knn_index, perplexity=30
          ),
          affinity.Uniform(knn_index=knn_index, k_neighbors=30),
          affinity.FixedSigmaNN(knn_index=knn_index, sigma=1),
          affinity.Multiscale(
              knn_index=knn_index, perplexities=[10, 20]
          ),
          affinity.MultiscaleMixture(
              knn_index=knn_index, perplexities=[10, 20]
          ),
      ]:
          # Without initilization
          embedding = TSNE().fit(affinities=aff)
          self.eval_embedding(embedding, self.y, aff.__class__.__name__)
          new_embedding = embedding.prepare_partial(self.x)
          new_embedding.optimize(50, learning_rate=1, inplace=True)
          self.eval_embedding(
              new_embedding,
              self.y,
              f"transform::{aff.__class__.__name__}",
          )
  
          # With initilization
          embedding = TSNE().fit(affinities=aff, initialization=init)
          self.eval_embedding(embedding, self.y, aff.__class__.__name__)
          new_embedding = embedding.prepare_partial(self.x)
          new_embedding.optimize(50, learning_rate=1, inplace=True)
          self.eval_embedding(
              new_embedding,
              self.y,
              f"transform::{aff.__class__.__name__}",
          )
  
imports: import unittest
  from functools import partial
  import numpy
  from scipy.spatial.distance import pdist, squareform, cdist
  from sklearn import datasets
  from sklearn.metrics import accuracy_score
  from sklearn.neighbors import KNeighborsClassifier, NearestNeighbors
  import openTSNE
  from openTSNE import affinity, initialization, nearest_neighbors, TSNEEmbedding
label_desc: Use image node_id 1 for calling the TestUsageWithCustomAffinityAndCustomNeighbors obj's underlying member method code with example usage: obj.test_affinity_with_queryable_knn_index() without return types