def METHOD_NAME(quay_api_store):
    state = AggregatedList()
    for org_key, org_data in quay_api_store.items():
        quay_api = org_data["api"]
        teams = org_data["teams"]
        if not teams:
            continue
        for team in teams:
            try:
                members = quay_api.list_team_members(team)
            except QuayTeamNotFoundException:
                logging.warning(
                    "Attempted to list members for team %s in "
                    "org %s/%s, but it doesn't exist",
                    team,
                    org_key.instance,
                    org_key.org_name,
                )
            else:
                # Teams are only added to the state if they exist so that
                # there is a proper diff between the desired and current state.
                state.add(
                    {"service": "quay-membership", "org": org_key, "team": team},
                    members,
                )
    return state