docs: def stop_conditions(self, G, E, I, known_winners, stats):
          """
          Determines if G, E state can be ended early
          :param G: networkx DiGraph of the current representation of "locked in" edges in RP
          :param E: networkx DiGraph of the remaining edges not yet considered
          :param I: list of all nodes
          :param known_winners: list of currently known PUT-winners
          :param stats: Stats object containing runtime statistics
          :return: -1 if no stop condition met, otherwise returns the int of the stop condition
          """
  
          in_deg = G.in_degree(I)
          possible_winners = [x[0] for x in in_deg if x[1] == 0]
  
          # Stop Condition 2: Pruning. Possible winners are subset of known winners
          if set(possible_winners) <= known_winners:
              stats.stop_condition_hits[2] += 1
              if self.debug_mode >= 2:
                  print("Stop Condition 2: pruned")
              return 2
  
          # Stop Condition 3: Exactly one node has indegree 0
          if len(possible_winners) == 1:
              stats.stop_condition_hits[3] += 1
              if self.debug_mode >= 2:
                  print("Stop Condition 3: one cand in degree 0")
              self.add_winners(G, I, known_winners, stats, possible_winners)
              return 3
  
          # Stop Condition 1: G U E is acyclic
          temp_G = nx.compose(G, E)
          if nx.is_directed_acyclic_graph(temp_G) is True:
              stats.stop_condition_hits[1] += 1
              if self.debug_mode >= 2:
                  print("Stop Condition 1: acyclic")
              self.add_winners(G, I, known_winners, stats)
              return 1
  
          return -1