def METHOD_NAME(
    matched_rows: ResultProxy, new_scopes: List[str]
):
    """Helper method to tack on new scopes to the fidesuserpermissions.scopes if user has existing scope."""
    for row in matched_rows:
        scopes: List[str] = row["scopes"] or []
        scopes.extend(new_scopes)
        add_new_scopes_query: TextClause = text(
            "UPDATE fidesuserpermissions SET scopes= :scopes WHERE id= :id"
        )
        bind.execute(
            add_new_scopes_query,
            {"scopes": sorted(list(set(scopes))), "id": row["id"]},
        )