public static @NotNull ProcessHandler startLegacyRemoteProcess(@NotNull PyRemoteSdkAdditionalData legacyAdditionalData,
                                                                 @NotNull GeneralCommandLine commandLine,
                                                                 @Nullable Project project,
                                                                 @Nullable PyRemotePathMapper pathMapper)
    throws ExecutionException {
    ProcessHandler processHandler;

    try {
      processHandler = doStartLegacyRemoteProcess(legacyAdditionalData, commandLine, project, pathMapper);
    }
    catch (UnsupportedPythonSdkTypeException e) {
      throw new ExecutionException(PyBundle.message("remote.interpreter.support.is.not.available", legacyAdditionalData.getClass()), e);
    }
    catch (ExecutionException e) {
      final Application application = ApplicationManager.getApplication();
      if (application != null && (application.isUnitTestMode() || application.isHeadlessEnvironment())) {
        throw new RuntimeException(e);
      }
      throw new ExecutionException(PyBundle.message("python.remote.process.starter.can.t.run.remote.interpreter", e.getMessage()), e);
    }
    ProcessTerminatedListener.attach(processHandler);
    return processHandler;
  }
public static @NotNull ProcessHandler startLegacyRemoteProcess(@NotNull PyRemoteSdkAdditionalData legacyAdditionalData,
                                                                 @NotNull GeneralCommandLine commandLine,
                                                                 @Nullable Project project,
                                                                 @Nullable PyRemotePathMapper pathMapper)