code: def break_edge(self, from_index, to_index, allow_reverse=False):
          
  
          # ensure that edge exists before attempting to remove it
          existing_edge = self.graph.get_edge_data(from_index, to_index)
          existing_reverse = None
  
          if existing_edge:
              self.graph.remove_edge(from_index, to_index)
  
          else:
              if allow_reverse:
                  existing_reverse = self.graph.get_edge_data(to_index,
                                                              from_index)
  
              if existing_reverse:
                  self.graph.remove_edge(to_index, from_index)
              else:
                  raise ValueError("Edge cannot be broken between {} and {};\
                                  no edge exists between those sites.".format(
                                  from_index, to_index
                                  ))
docs: Remove an edge from the MoleculeGraph
  
          :param from_index: int
          :param to_index: int
          :param allow_reverse: If allow_reverse is True, then break_edge will
          attempt to break both (from_index, to_index) and, failing that,
          will attempt to break (to_index, from_index).
          :return: