def METHOD_NAME(request):
    "Patch the default home directory and $HOME environment for all tests at once."
    use_real_env = request.node.get_closest_marker("use_real_env")
    with TemporaryDirectory(prefix="fake_home_") as home:
        if use_real_env:
            mock_env_cm = nullcontext()
        else:
            mock_env_cm = mock_env(home)
        with mock_env_cm:
            Path(home, ".cumulusci").mkdir()
            Path(home, ".cumulusci/cumulusci.yml").touch()
            yield