code: def is_neighbor(self, vertex):
      return vertex in self.edges or vertex in self.r_edges
  
imports: from __future__ import annotations
  import heapq
  import itertools
  import math
  import random
  from river import base
label_desc: Use image node_id 10 for calling the Vertex obj's underlying member method code with example usage: obj.is_neighbor(vertex) and returns: unknown