code: public static String formatAllLabels(Node node, Map<String, Set<String>> uniqueConstraints, Set<String> indexNames) {
          StringBuilder result = new StringBuilder(100);
          boolean uniqueLabelFound = false;
          List<String> list = getLabelsSorted(node);
  
          for (String labelName : list) {
              uniqueLabelFound = isUniqueLabelFound(node, uniqueConstraints, labelName);
              if (indexNames != null && indexNames.contains(labelName))
                  result.insert(0, label(labelName));
              else
                  result.append(label(labelName));
          }
          if (!uniqueLabelFound) {
              result.append(label(UNIQUE_ID_LABEL));
          }
          return result.toString();
      }
docs: ---- labels ----