docs: private static String toXMLString(Collection<TypedDependency> dependencies) {
      StringBuilder buf = new StringBuilder("<dependencies style=\"typed\">\n");
      for (TypedDependency td : dependencies) {
        String reln = td.reln().toString();
        String gov = td.gov().value();
        int govIdx = td.gov().index();
        String dep = td.dep().value();
        int depIdx = td.dep().index();
        boolean extra = td.extra();
        // add an attribute if the node is a copy
        // (this happens in collapsing when different prepositions are conjuncts)
        String govCopy = "";
        Integer copyGov = td.gov().label.get(CopyAnnotation.class);
        if (copyGov != null) {
          govCopy = " copy=\"" + copyGov + "\"";
        }
        String depCopy = "";
        Integer copyDep = td.dep().label.get(CopyAnnotation.class);
        if (copyDep != null) {
          depCopy = " copy=\"" + copyDep + "\"";
        }
        // add an attribute if the typed dependency is an extra relation (do not preserve the tree structure)
        String extraAttr = "";
        if (extra) {
          extraAttr = " extra=\"yes\"";
        }
        buf.append("  <dep type=\"").append(XMLUtils.escapeXML(reln)).append('\"').append(extraAttr).append(">\n");
        buf.append("    <governor idx=\"").append(govIdx).append('\"').append(govCopy).append('>').append(XMLUtils.escapeXML(gov)).append("</governor>\n");
        buf.append("    <dependent idx=\"").append(depIdx).append('\"').append(depCopy).append('>').append(XMLUtils.escapeXML(dep)).append("</dependent>\n");
        buf.append("  </dep>\n");
      }
      buf.append("</dependencies>");
      return buf.toString();
    }