def get_compiled_app(
    reload: bool = False,
    export: bool = False,
    dry_run: bool = False,
    check_if_schema_up_to_date: bool = False,
) -> ModuleType:
    """Get the app module based on the default config after first compiling it.

    Args:
        reload: Re-import the app module from disk
        export: Compile the app for export
        dry_run: If True, do not write the compiled app to disk.
        check_if_schema_up_to_date: If True, check if the schema is up to date.

    Returns:
        The compiled app based on the default config.
    """
    app, app_module = get_and_validate_app(
        reload=reload, check_if_schema_up_to_date=check_if_schema_up_to_date
    )
    # For py3.9 compatibility when redis is used, we MUST add any decorator pages
    # before compiling the app in a thread to avoid event loop error (REF-2172).
    app._apply_decorated_pages()
    app._compile(export=export, dry_run=dry_run)
    return app_module
Get the app module based on the default config after first compiling it.

    Args:
        reload: Re-import the app module from disk
        export: Compile the app for export
        dry_run: If True, do not write the compiled app to disk.
        check_if_schema_up_to_date: If True, check if the schema is up to date.

    Returns:
        The compiled app based on the default config.
    
reflex/utils/prerequisites.py