<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def create_role(name):
 """ Create a new role. """

    role = role_manager.create(name=name)
    if click.confirm(f'Are you sure you want to create {role!r}?'):
        role_manager.save(role, commit=True)
        click.echo(f'Successfully created {role!r}')
    else:
        click.echo('Cancelled.')