private static @Nullable Process getPtyProcess(@NotNull ProcessHandler processHandler) {
    if (!(processHandler instanceof BaseProcessHandler)) {
      if (LOG.isDebugEnabled()) {
        LOG.debug("ProcessHandler doesn't support terminal window resizing: " + processHandler.getClass());
      }
      return null;
    }
    Process process = ((BaseProcessHandler<?>)processHandler).getProcess();
    if (!(process instanceof PtyProcess) && !(process instanceof PtyBasedProcess)) {
      if (LOG.isDebugEnabled()) {
        LOG.debug("Process doesn't support terminal window resizing: " + process.getClass());
      }
    }
    return process;
  }
private static @Nullable Process getPtyProcess(@NotNull ProcessHandler processHandler)