<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def ban(self, member, reason=None, *, request_kick=True):
 """ Ban an occupant from re-joining the MUC. :param member: The occupant to ban. :type member: :class:`Occupant` :param reason: A reason to show to the members of the conversation including the banned member. :type reason: :class:`str` :param request_kick: A flag indicating that the member should be removed from the conversation immediately, too. :type request_kick: :class:`bool` `request_kick` is supported by MUC, but setting it to false has no effect: banned members are always immediately kicked. .. seealso:: :meth:`.AbstractConversation.ban` for the full interface specification. """

        if member.direct_jid is None:
            raise ValueError(
                "cannot ban members whose direct JID is not "
                "known")

        yield from self.muc_set_affiliation(
            member.direct_jid,
            "outcast",
            reason=reason
        )