Returns true if our user is a member of the given group.

def is_member_of(self, group_dn):
        """
        Returns true if our user is a member of the given group.
        """
        is_member = None

        # Normalize the DN
        group_dn = group_dn.lower()

        # If we have self._group_dns, we'll use it. Otherwise, we'll try to
        # avoid the cost of loading it.
        if self._group_dns is None:
            is_member = self._group_type.is_member(self._ldap_user, group_dn)

        if is_member is None:
            is_member = group_dn in self.get_group_dns()

        logger.debug(
            "{} is{}a member of {}".format(
                self._ldap_user.dn, is_member and " " or " not ", group_dn
            )
        )

        return is_member