def METHOD_NAME(request):
    file_loc = Path.home() / ".condarc"
    old_config_file = None
    if file_loc.exists():
        old_config_file = file_loc.rename(Path.home() / ".condarc.bkup")
    with open(file_loc, "w") as fo:
        yaml.dump(request.param, fo)
    yield file_loc
    if old_config_file:
        file_loc.unlink()
        old_config_file.rename(file_loc)