String (@NotNull String output) { final List<String> lines = Arrays.asList(StringUtil.splitByLines(output)); final String version = PatternUtil.getFirstMatch(lines, VERSION_RE); final String pythonVersion = PatternUtil.getFirstMatch(lines, PYTHON_VERSION_RE); if (version != null) { final StringBuilder builder = new StringBuilder(); builder.append(version); if (pythonVersion != null) { builder.append(" ["); builder.append(pythonVersion); builder.append("]"); } return builder.toString(); } return null; }