docs: public Map<String, FieldType> flatten() {
          if (fields == null || fields.length == 0) {
              return Collections.<String, FieldType> emptyMap();
          }
  
          Map<String, FieldType> map = new LinkedHashMap<String, FieldType>();
  
          for (Field nestedField : fields) {
              addSubFieldToMap(map, nestedField, null);
          }
  
          return map;
      }