code: def testUMAPComputeWeights(self):
      edges = [0, 1, 0, 2, 1, 2, 1, 3, 2, 3, 2, 0]
      edges = list(zip(edges[::2], edges[1::2]))
      dist = [1, 1.5, 1.8, 2.0, 3.4, 0.5]
      # NOTE: you need a directed graph to make sense of the symmetryzation
      g = Graph(edges, directed=True)
      weights = umap_compute_weights(g, dist)
      self.assertEqual(
          weights,
          [
              1.0,
              1.0,
              1.0,
              1.1253517471925912e-07,
              6.14421235332821e-06,
              0.0,
          ],
      )
  
imports: import unittest
  from math import hypot
  from igraph import Graph, Layout, BoundingBox, InternalError
  from igraph import umap_compute_weights
label_desc: Use image node_id 9 for calling the LayoutAlgorithmTests obj's underlying member method code with example usage: obj.testUMAPComputeWeights() without return types