def METHOD_NAME(conf_file, expected, tmp_path, monkeypatch):
    """Test config check."""
    mpconf_file, conf_json, mp_location = conf_file
    init_cwd = str(Path(".").absolute())
    settings_file = "missing_file"
    for file in tmp_path.parent.glob("config.json"):
        file.unlink()
    for file in tmp_path.parent.glob("msticpyconfig.yaml"):
        file.unlink()
    try:
        # If we want to test against config files in isolated directory
        if mp_location != SubDirCase.NONE:
            # Read contents of source file
            for file in (mpconf_file, conf_json):
                if file is None:
                    continue
                tgt_file = Path(TEST_DATA_PATH).joinpath(file).name
                file_txt = (
                    Path(TEST_DATA_PATH).joinpath(file).read_text(encoding="utf-8")
                )
                dest_file = (
                    "config.json"
                    if tgt_file.endswith(".json")
                    else "msticpyconfig.yaml"
                )
                # write the file to the folder
                tmp_path.joinpath(dest_file).write_text(file_txt)
            cwd_path = str(tmp_path)
            # If sub-dir, change to the directory, so WorkspaceConfig has to search.
            if mp_location in (SubDirCase.MAIN_ENV_PTR, SubDirCase.SEARCH):
                cwd_path = tmp_path.joinpath("sub_folder")
                cwd_path.mkdir(parents=True, exist_ok=True)
            os.chdir(str(cwd_path))
            if mp_location == SubDirCase.SEARCH or mpconf_file is None:
                # Pass non-existing file to custom_mp_config to bypass default settings
                settings_file = "missing_file"
            else:
                settings_file = tmp_path.joinpath("msticpyconfig.yaml")
        else:
            os.chdir(str(tmp_path))
        # with custom_mp_config(settings_file, path_check=False):
        monkeypatch.setenv("MSTICPYCONFIG", str(settings_file))
        monkeypatch.setattr(nbinit, "current_config_path", lambda: None)
        monkeypatch.setattr(nbinit, "is_in_aml", lambda: True)
        monkeypatch.setattr(azure_ml_tools, "get_aml_user_folder", lambda: tmp_path)
        result = _get_or_create_config()
        print("result=", result)
        check.equal(result, expected, "Result")
    finally:
        os.chdir(init_cwd)