<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def cli(ctx, device, log_level, log_file, reader):
 """ Configure your YubiKey via the command line. Examples: \b List connected YubiKeys, only output serial number: $ ykman list --serials \b Show information about YubiKey with serial number 0123456: $ ykman --device 0123456 info """

    ctx.obj = YkmanContextObject()

    if log_level:
        ykman.logging_setup.setup(log_level, log_file=log_file)

    if reader and device:
        ctx.fail('--reader and --device options can\'t be combined.')

    subcmd = next(c for c in COMMANDS if c.name == ctx.invoked_subcommand)
    if subcmd == list_keys:
        if reader:
            ctx.fail('--reader and list command can\'t be combined.')
        return

    transports = getattr(subcmd, 'transports', TRANSPORT.usb_transports())
    if transports:
        def resolve_device():
            if device is not None:
                dev = _run_cmd_for_serial(ctx, subcmd.name, transports, device)
            else:
                dev = _run_cmd_for_single(ctx, subcmd.name, transports, reader)
            ctx.call_on_close(dev.close)
            return dev
        ctx.obj.add_resolver('dev', resolve_device)