code: def remove_edge_from_heap(self, segment_ids):
          
          self._initialize_heap()
          key = normalize_edge(segment_ids)
          if key in self.edge_map:
              self.edge_map[key][0] = None
              self.num_valid_edges -= 1
docs: Remove an edge from the heap.