code: def push_edge(self, node: Vertex, dist: float, max_edges: int) -> int:
      if self.is_neighbor(node) or node == self:
          return 0
  
      if len(self.edges) >= max_edges:
          if (
              self.worst_edge is None
              or self.edges.get(self.worst_edge, math.inf) <= dist
          ):
              return 0
          self.rem_edge(self.worst_edge)
  
      self.add_edge(node, dist)
  
      return 1
  
imports: from __future__ import annotations
  import heapq
  import itertools
  import math
  import random
  from river import base
label_desc: Use image node_id 9 for calling the Vertex obj's underlying member method code with example usage: obj.push_edge(node, dist, max_edges) and returns: int, int, int