def update_roles(db, entity, roles):
    """Add roles to an entity (token, user, etc.)

    Calls `grant_role` for each role.
    """
    for rolename in roles:
        grant_role(db, entity=entity, rolename=rolename)
Add roles to an entity (token, user, etc.)

Calls `grant_role` for each role.
jupyterhub/roles.py