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