<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def oath(ctx, password):
 """ Manage OATH Application. Examples: \b Generate codes for credentials starting with 'yubi': $ ykman oath code yubi \b Add a touch credential with the secret key f5up4ub3dw and the name yubico: $ ykman oath add yubico f5up4ub3dw --touch \b Set a password for the OATH application: $ ykman oath set-password """

    try:
        controller = OathController(ctx.obj['dev'].driver)
        ctx.obj['controller'] = controller
        ctx.obj['settings'] = Settings('oath')
    except APDUError as e:
        if e.sw == SW.NOT_FOUND:
            ctx.fail("The OATH application can't be found on this YubiKey.")
        raise

    if password:
        ctx.obj['key'] = controller.derive_key(password)