code: def test_precomputed_affinity_normalization(self):
      aff1 = PerplexityBasedNN(self.iris)
      aff2 = affinity.PrecomputedAffinities(aff1.P * 2)
      np.testing.assert_allclose(
          aff1.P.toarray(),
          aff2.P.toarray(),
          err_msg="Precomputed affinities are not normalized to sum to 1.",
      )
  
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 3 for calling the TestPrecomputedAffinity obj's underlying member method code with example usage: obj.test_precomputed_affinity_normalization() without return types