def get_roles_for_user(user_db):
 role_names = UserRoleAssignment.query(user=user_db.name).only('role').scalar('role')
 result = Role.query(name__in=role_names)
 return result

def get_roles_for_user ( user_db ) : role_names = UserRoleAssignment . query ( user = user_db . name ) . only ( 'role' ) . scalar ( 'role' ) result = Role . query ( name__in = role_names ) return result
retrieve all the roles assigned to the provided user .