def METHOD_NAME(version):
    if not check_database_environment():
        raise ValueError("Missing database configuration")
    stack = os.getenv("CF_STACK")
    logging.info(
        "Preflight check on Mendix version [%s] and stack [%s]...",
        version,
        stack,
    )
    if stack not in SUPPORTED_STACKS:
        raise NotImplementedError(f"Stack [{stack}] is not supported by this buildpack")
    if not runtime.is_version_implemented(version):
        raise NotImplementedError(
            "Mendix [{version.major}] is not supported by this buildpack"
        )
    if not runtime.is_version_supported(version):
        logging.warning(
            "Mendix [%s] is end-of-support. Please use a supported Mendix version "
            "(https://docs.mendix.com/releasenotes/studio-pro/lts-mts).",
            version.major,
        )
    elif not runtime.is_version_maintained(version):
        logging.info(
            "Mendix [%d.%d] is not maintained. Please use a medium- or long-term "
            "supported Mendix version to easily receive fixes "
            "(https://docs.mendix.com/releasenotes/studio-pro/lts-mts).",
            version.major,
            version.minor,
        )
    logging.info("Preflight check completed")