def METHOD_NAME(prize, donation, secondaryAmount=None):
    if prize.contains_draw_time(donation.timereceived):
        amount = secondaryAmount if secondaryAmount is not None else donation.amount
        if prize.sumdonations or amount >= prize.minimumbid:
            return amount
    return None