def METHOD_NAME(args, conf_class=Conf, cli_class=Cli, option_parser_class=OptionParser):
    try:
        dnf.i18n.setup_stdout()
        with dnf.cli.cli.BaseCli(conf_class()) as base:
            return _main(base, args, cli_class, option_parser_class)
    except dnf.exceptions.ProcessLockError as e:
        logger.critical(e.value)
        show_lock_owner(e.pid)
        return 200
    except dnf.exceptions.LockError as e:
        logger.critical(e.value)
        return 200
    except dnf.exceptions.DepsolveError as e:
        return 1
    except dnf.exceptions.Error as e:
        return ex_Error(e)
    except hawkey.Exception as e:
        logger.critical(_('Error: %s'), ucd(e))
        return 1
    except libdnf.error.Error as e:
        logger.critical(_('Error: %s'), ucd(e))
        return 1
    except IOError as e:
        return ex_IOError(e)
    except KeyboardInterrupt as e:
        logger.critical('{}: {}'.format(type(e).__name__, _("Terminated.")))
        return 1