@classmethod<EOL><INDENT>def get(cls, group, user):<DEDENT>
try:<EOL><INDENT>m = cls.query.filter_by(user_id=user.get_id(), group=group).one()<EOL>return m<EOL><DEDENT>except Exception:<EOL><INDENT>return None<EOL><DEDENT>
Get membership for given user and group.

        :param group: Group object.
        :param user: User object.
        :returns: Membership or None.