protected @NotNull ProcessHandler createProcessHandler(@NotNull Process process,
                                                         @NotNull String commandLineString,
                                                         @NotNull TargetEnvironment targetEnvironment,
                                                         @NotNull TargetedCommandLine commandLine) {
    if (targetEnvironment instanceof LocalTargetEnvironment) {
      // TODO This special treatment of local target must be replaced with a generalized approach
      //  (f.e. with an ability of a target environment to match arbitrary local path to a target one)
      if (isDebug()) {
        return new PyDebugProcessHandler(process, commandLineString, commandLine.getCharset());
      }
      return new PythonProcessHandler(process, commandLineString, commandLine.getCharset());
    }
    PathMappingSettings pathMappingSettings = new PathMappingSettings();
    // add mappings from run configuration on top
    PathMappingSettings runConfigurationPathMappings = myConfig.myMappingSettings;
    if (runConfigurationPathMappings != null) {
      pathMappingSettings.addAll(runConfigurationPathMappings);
    }
    // add path mappings configured in SDK, they will be handled in second place
    PathMappingSettings sdkPathMappings = getSdkPathMappings();
    if (sdkPathMappings != null) {
      pathMappingSettings.addAll(sdkPathMappings);
    }
    final boolean isMostlySilentProcess = false;
    PyTargetPathMapper consolidatedPathMappings = new PyTargetPathMapper(targetEnvironment, pathMappingSettings);
    return PyCustomProcessHandlerProvider.createProcessHandler(process, targetEnvironment, commandLineString, commandLine.getCharset(),
                                                               consolidatedPathMappings, isMostlySilentProcess, myRunWithPty);
  }
protected @NotNull ProcessHandler createProcessHandler(@NotNull Process process,
                                                         @NotNull String commandLineString,
                                                         @NotNull TargetEnvironment targetEnvironment,
                                                         @NotNull TargetedCommandLine commandLine)