Using random tie-breaking, run through one procedure of RP and add resulting winner to known_winners
        :param E: DiGraph, All postive edges in the wmg
        :param I: List of all nodes in E
        :param known_winners: Set of already-discovered PUT-winners to be added to
        :param stats: Stats object storing runtime statistics
        :return: Nothing

def sample(self, E, I, known_winners, stats):
        '''
        Using random tie-breaking, run through one procedure of RP and add resulting winner to known_winners
        :param E: DiGraph, All postive edges in the wmg
        :param I: List of all nodes in E
        :param known_winners: Set of already-discovered PUT-winners to be added to
        :param stats: Stats object storing runtime statistics
        :return: Nothing
        '''
        G = nx.DiGraph()
        G.add_nodes_from(I)

        Ec = E.copy()

        while len(Ec.edges()) != 0:
            max_weight = max([(d['weight']) for (u, v, d) in Ec.edges(data=True)])
            tier = [(u, v) for (u, v, d) in Ec.edges(data=True) if d['weight'] == max_weight]

            # e = tier[random.randint(0, len(tier) -1 )]
            priorities = []
            potential_winners = set([x[0] for x in G.in_degree(I) if x[1] == 0])
            base_priority = len(potential_winners - known_winners)
            for e in tier:
                if G.in_degree(e[1]) == 0 and e[1] not in known_winners:
                    priority = base_priority - 1
                else:
                    priority = base_priority
                priorities.append(exp(priority / self.tau_for_testing))
            q_sum = sum(priorities)
            probs = []
            for v in priorities:
                probs.append(v / q_sum)
            legal_actions_index = [i for i in range(len(tier))]
            e = tier[np.random.choice(legal_actions_index, p=probs)]

            if not nx.has_path(G, e[1], e[0]):
                G.add_edges_from([e])
                Ec.remove_edges_from([e])
            else:
                Ec.remove_edges_from([e])

        self.add_winners(G, I, known_winners, stats)