<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def clear_roles(user):
 """Remove all roles from a user."""

    roles = get_user_roles(user)

    for role in roles:
        role.remove_role_from_user(user)

    return roles