PythonProcessStarter () { return (config, commandLine) -> { Sdk sdk = PythonSdkUtil.findSdkByPath(myConfig.getInterpreterPath()); assert sdk != null : "No SDK For " + myConfig.getInterpreterPath(); final ProcessHandler processHandler; var additionalData = sdk.getSdkAdditionalData(); if (additionalData instanceof PyRemoteSdkAdditionalDataMarker) { assert additionalData instanceof PyRemoteSdkAdditionalData : "additionalData is remote, but not legacy. Is it a target-based? " + additionalData; PyRemotePathMapper pathMapper = createRemotePathMapper(); processHandler = PyRemoteProcessStarter.startLegacyRemoteProcess((PyRemoteSdkAdditionalData)additionalData, commandLine, myConfig.getProject(), pathMapper); } else { processHandler = doCreateProcess(commandLine); ProcessTerminatedListener.attach(processHandler); } return processHandler; }; }