'Set the amount a participant wants to take from this team during payday.
:param Participant participant: the participant to set the take for
:param Decimal take: the amount the participant wants to take
:param Participant recorder: the participant making the change
:return: the new take as a py:class:`~decimal.Decimal`
:raises: :py:exc:`NotAllowed`
It is a bug to pass in a ``participant`` or ``recorder`` that is
suspicious, unclaimed, or without a verified email and identity.
Furthermore, :py:exc:`NotAllowed` is raised in the following circumstances:
- ``recorder`` is neither ``participant`` nor the team owner
- ``recorder`` is the team owner and ``take`` is neither zero nor $0.01
- ``recorder`` is ``participant``, but ``participant`` isn\'t already on the team'

def set_take_for(self, participant, take, recorder, cursor=None):

    def vet(p):
        if p.is_suspicious:
            raise NotAllowed(u'user    must    not    be    flagged    as    suspicious')
        elif (not p.email_address):
            raise NotAllowed(u'user    must    have    added    at    least    one    email    address')
        elif (not p.has_verified_identity):
            raise NotAllowed(u'user    must    have    a    verified    identity')
        elif (not p.is_claimed):
            raise NotAllowed(u'user    must    have    claimed    the    account')
    vet(participant)
    vet(recorder)
    owner_recording = (recorder.username == self.owner)
    owner_taking = (participant.username == self.owner)
    taker_recording = (recorder == participant)
    adding_or_removing = (take in (ZERO, PENNY))
    if owner_recording:
        if ((not adding_or_removing) and (not owner_taking)):
            raise NotAllowed(u'owner    can    only    add    and    remove    members,    not    otherwise    set    takes')
    elif (not taker_recording):
        raise NotAllowed(u'can    only    set    own    take')
    with self.db.get_cursor(cursor) as cursor:
        cursor.run(u'LOCK    TABLE    takes    IN    EXCLUSIVE    MODE')
        old_takes = self.compute_actual_takes(cursor)
        if (recorder.username != self.owner):
            if ((recorder == participant) and (participant.id not in old_takes)):
                raise NotAllowed(u'can    only    set    take    if    already    a    member    of    the    team')
        new_take = cursor.one(u'\n\n                                                                INSERT    INTO    takes\n                                                                                                                (ctime,    participant_id,    team_id,    amount,    recorder_id)\n                                                                                    VALUES    (    COALESCE    ((    SELECT    ctime\n                                                                                                                                                                                FROM    takes\n                                                                                                                                                                            WHERE    (participant_id=%(participant_id)s\n                                                                                                                                                                                                        AND    team_id=%(team_id)s)\n                                                                                                                                                                            LIMIT    1\n                                                                                                                                                                    ),    CURRENT_TIMESTAMP)\n                                                                                                                ,    %(participant_id)s,    %(team_id)s,    %(amount)s,    %(recorder_id)s\n                                                                                                                    )\n                                                                        RETURNING    amount\n\n                                                ', {u'participant_id': participant.id, u'team_id': self.id, u'amount': take, u'recorder_id': recorder.id})
        all_new_takes = self.compute_actual_takes(cursor)
        self.update_taking(old_takes, all_new_takes, cursor, participant)
        self.update_distributing(all_new_takes, cursor)
        return new_take
