def get_group_list(project, client):
    """Return a sorted list of groups for project."""
    groups = client.get(f"/api/projects/{project['pk']}/groups/")
    groups = sorted(groups, key=lambda x: x["pk"])
    return groups