def METHOD_NAME(tmp_path, monkeypatch, local_repo) -> ConfigFile:
    for env_var in (
        'DD_ENV',
        'DD_SERVICE',
        'DD_SITE',
        'DD_LOGS_CONFIG_DD_URL',
        'DD_DD_URL',
        'DD_API_KEY',
        'DD_APP_KEY',
        'DDEV_REPO',
        'DDEV_TEST_ENABLE_TRACING',
        'PYTHON_FILTER',
        'HATCH_VERBOSE',
        'HATCH_QUIET',
    ):
        monkeypatch.delenv(env_var, raising=False)
    path = Path(tmp_path, 'config.toml')
    monkeypatch.setenv(ConfigEnvVars.CONFIG, str(path))
    config = ConfigFile(path)
    config.reset()
    # Provide a real default for times when tests have no need to modify the repo
    config.model.repos['core'] = str(local_repo)
    config.save()
    return config