public static Map<String, String> parseCondaCommonStdout(String out)
      throws IOException, InterruptedException {

    Map<String, String> kv = new LinkedHashMap<String, String>();
    String[] lines = out.split("\n");
    for (String s : lines) {
      if (s == null || s.isEmpty() || s.startsWith("#")) {
        continue;
      }
      Matcher match = PATTERN_OUTPUT_ENV_LIST.matcher(s);

      if (!match.matches()) {
        continue;
      }
      kv.put(match.group(1), match.group(2));
    }

    return kv;
  }
@Test
  void testParseCondaCommonStdout()
      throws IOException, InterruptedException {

    StringBuilder sb = new StringBuilder()
        .append("# comment1\n")
        .append("# comment2\n")
        .append("env1     /location1\n")
        .append("env2     /location2\n");

    Map<String, String> locationPerEnv =
        PythonCondaInterpreter.parseCondaCommonStdout(sb.toString());

    assertEquals("/location1", locationPerEnv.get("env1"));
    assertEquals("/location2", locationPerEnv.get("env2"));
  }