def METHOD_NAME(self, page_data: list) -> int:
    """Iterate over all Users and assign Groups using memberOf Field"""
    if not self._source.sync_groups:
        self.message("Group syncing is disabled for this Source")
        return -1
    membership_count = 0
    for group in page_data:
        if "attributes" not in group:
            continue
        members = group.get("attributes", {}).get(self._source.group_membership_field, [])
        ak_group = self.get_group(group)
        if not ak_group:
            continue
        membership_mapping_attribute = LDAP_DISTINGUISHED_NAME
        if self._source.group_membership_field == "memberUid":
            # If memberships are based on the posixGroup's 'memberUid'
            # attribute we use the RDN instead of the FDN to lookup members.
            membership_mapping_attribute = LDAP_UNIQUENESS
        users = User.objects.filter(
            Q(**{f"attributes__{membership_mapping_attribute}__in": members})
            | Q(
                **{
                    f"attributes__{membership_mapping_attribute}__isnull": True,
                    "ak_groups__in": [ak_group],
                }
            )
        )
        membership_count += 1
        membership_count += users.count()
        ak_group.users.set(users)
        ak_group.save()
    self._logger.debug("Successfully updated group membership")
    return membership_count