def METHOD_NAME(*args: Any) -> int:
    try:
        status = run_func(*args)
        assert isinstance(status, int)
        return status
    except DiagnosticPipError as exc:
        logger.error("[present-rich] %s", exc)
        logger.debug("Exception information:", exc_info=True)
        return ERROR
    except PreviousBuildDirError as exc:
        logger.critical(str(exc))
        logger.debug("Exception information:", exc_info=True)
        return PREVIOUS_BUILD_DIR_ERROR
    except (
        InstallationError,
        UninstallationError,
        BadCommand,
        NetworkConnectionError,
    ) as exc:
        logger.critical(str(exc))
        logger.debug("Exception information:", exc_info=True)
        return ERROR
    except CommandError as exc:
        logger.critical("%s", exc)
        logger.debug("Exception information:", exc_info=True)
        return ERROR
    except BrokenStdoutLoggingError:
        # Bypass our logger and write any remaining messages to
        # stderr because stdout no longer works.
        print("ERROR: Pipe to stdout was broken", file=sys.stderr)
        if level_number <= logging.DEBUG:
            traceback.print_exc(file=sys.stderr)
        return ERROR
    except KeyboardInterrupt:
        logger.critical("Operation cancelled by user")
        logger.debug("Exception information:", exc_info=True)
        return ERROR
    except BaseException:
        logger.critical("Exception:", exc_info=True)
        return UNKNOWN_ERROR