def METHOD_NAME():
    client = boto3.client("amp", region_name="ap-southeast-1")
    w_id = client.create_workspace()["workspaceId"]
    for idx in range(125):
        client.create_rule_groups_namespace(
            data=b"a", name=f"ns{idx}", workspaceId=w_id
        )
    # default pagesize is 100
    page1 = client.list_rule_groups_namespaces(workspaceId=w_id)
    assert len(page1["ruleGroupsNamespaces"]) == 100
    assert "nextToken" in page1
    # We can ask for a smaller pagesize
    page2 = client.list_rule_groups_namespaces(
        workspaceId=w_id, maxResults=15, nextToken=page1["nextToken"]
    )
    assert len(page2["ruleGroupsNamespaces"]) == 15
    assert "nextToken" in page2
    page3 = client.list_rule_groups_namespaces(
        workspaceId=w_id, maxResults=15, nextToken=page2["nextToken"]
    )
    assert len(page3["ruleGroupsNamespaces"]) == 10
    assert "nextToken" not in page3
    # We could request all of them in one go
    full_page = client.list_rule_groups_namespaces(workspaceId=w_id, maxResults=150)
    assert len(full_page["ruleGroupsNamespaces"]) == 125
    assert "nextToken" not in full_page