def METHOD_NAME(
    wheel_directory: str,
    config_settings: Optional[Dict[str, Any]] = None,
    metadata_directory: Optional[str] = None,
) -> str:
    """Build an editable installation. We mostly delegate to Hatchling."""
    logger = logging.getLogger("xgboost.packager.build_editable")
    if config_settings:
        raise NotImplementedError(
            "XGBoost's custom build backend doesn't support config_settings option "
            f"when building editable installation. {config_settings=}"
        )
    if locate_local_libxgboost(TOPLEVEL_DIR, logger=logger) is None:
        raise RuntimeError(
            "To use the editable installation, first build libxgboost with CMake. "
            "See https://xgboost.readthedocs.io/en/latest/build.html for detailed instructions."
        )
    return hatchling.build.METHOD_NAME(
        wheel_directory, config_settings, metadata_directory
    )