'Choose a trusted candidate to introduce to someone else.
The more trust you have for someone, the higher the chance is to forward them.'

def dispersy_get_introduce_candidate(self, exclude_candidate=None):

    if (not self._live_edges_enabled):
        return super(TrustChainCommunity, self).dispersy_get_introduce_candidate(exclude_candidate)
    eligible = [candidate for candidate in self._candidates.itervalues() if (candidate.get_member() and (candidate != exclude_candidate))]
    if (not eligible):
        return super(TrustChainCommunity, self).dispersy_get_introduce_candidate(exclude_candidate)
    total_trust = sum([self.get_trust(candidate.get_member()) for candidate in eligible])
    random_trust_i = randint(0, (total_trust - 1))
    current_trust_i = 0
    for i in xrange(0, len(eligible)):
        next_trust_i = self.get_trust(eligible[i].get_member())
        if ((current_trust_i + next_trust_i) > random_trust_i):
            return eligible[i]
        else:
            current_trust_i += next_trust_i
    return eligible[(-1)]
