def subscribe(self, user):
if self.subscription_policy == SubscriptionPolicy.OPEN:<EOL><INDENT>return self.add_member(user)<EOL><DEDENT>elif self.subscription_policy == SubscriptionPolicy.APPROVAL:<EOL><INDENT>return self.add_member(user, state=MembershipState.PENDING_ADMIN)<EOL><DEDENT>elif self.subscription_policy == SubscriptionPolicy.CLOSED:<EOL><INDENT>return None<EOL><DEDENT>
Subscribe a user to a group (done by users).

        Wrapper around ``add_member()`` which checks subscription policy.

        :param user: User to subscribe.
        :returns: Newly created Membership or None.