def bonus(self, participant):
scores = [<EOL>n.score for n in participant.nodes() if n.network.role == "<STR_LIT>"<EOL>]<EOL>average = float(sum(scores)) / float(len(scores))<EOL>bonus = round(max(<NUM_LIT:0.0>, ((average - <NUM_LIT:0.5>) * <NUM_LIT:2>)) * self.bonus_payment, <NUM_LIT:2>)<EOL>return bonus<EOL>
Calculate a participants bonus.