def METHOD_NAME(self):
    filter = "(&(objectclass=Group))"
    values = [
        "cn",
    ]
    l = ldap.initialize(AUTH_LDAP_SERVER_URI)
    try:
        l.protocol_version = ldap.VERSION3
        l.set_option(ldap.OPT_REFERRALS, 0)
        l.simple_bind_s(
            AUTH_LDAP_BIND_DN.encode("utf-8"), AUTH_LDAP_BIND_PASSWORD
        )
        page_control = ldap.controls.SimplePagedResultsControl(
            True, size=1000, cookie=""
        )
        result = []
        pages = 0
        while True:
            pages += 1
            response = l.search_ext(
                AUTH_LDAP_GROUP,
                ldap.SCOPE_SUBTREE,
                filter,
                values,
                serverctrls=[page_control],
            )
            rtype, rdata, rmsgid, serverctrls = l.result3(response)
            result.extend(rdata)
            controls = [
                control
                for control in serverctrls
                if control.controlType
                == ldap.controls.SimplePagedResultsControl.controlType
            ]
            if not controls:
                raise Exception("The server ignores RFC 2696 control")
            if not controls[0].cookie:
                break
            page_control.cookie = controls[0].cookie
        # result_id = l.search(AUTH_LDAP_GROUP, ldap.SCOPE_SUBTREE, filter, values)
        # result_type, result_data = l.result(result_id, 1)
    finally:
        l.unbind()
    return result