def METHOD_NAME(monkeypatch, tmp_path):
    # Monkeypatch cwd() to use a test folder.
    monkeypatch.setattr(Path, "cwd", lambda: tmp_path)
    create_file(
        tmp_path / "pyproject.toml",
        """