def METHOD_NAME(monkeypatch, tmpdir, ppid):
    connection_path = os.path.join(tmpdir, ppid)
    monkeypatch.setattr("lightning.app.cli.connect.app._clean_lightning_connection", MagicMock())
    monkeypatch.setattr("lightning.app.cli.connect.app._PPID", ppid)
    monkeypatch.setattr("lightning.app.cli.connect.app._LIGHTNING_CONNECTION", tmpdir)
    monkeypatch.setattr("lightning.app.cli.connect.app._LIGHTNING_CONNECTION_FOLDER", connection_path)
    return connection_path