code: def fill(self, neighbors: list[Vertex], dists: list[float]):
      for n, dist in zip(neighbors, dists):
          self.edges[n] = dist
          self.flags.add(n)
          n.r_edges[self] = dist
  
      # Neighbors are ordered by distance
      self.worst_edge = n
  
imports: from __future__ import annotations
  import heapq
  import itertools
  import math
  import random
  from river import base
label_desc: Use image node_id 6 for calling the Vertex obj's underlying member method code with example usage: obj.fill(neighbors, dists) without return types