docs: protected static <T> T modifyKeys(T object, Function<String, String> keyMapper, String toReplace) {
          if (object instanceof Map) {
              Map<String, Object> document = (Map<String, Object>) object;
              List<String> keysWithDots = new LinkedList<>();
              for (Map.Entry<String, Object> entry : document.entrySet()) {
                  if (entry.getKey().contains(toReplace)) {
                      keysWithDots.add(entry.getKey());
                  }
                  modifyKeys(entry.getValue(), keyMapper, toReplace);
              }
              for (String key : keysWithDots) {
                  Object o = document.remove(key);
                  document.put(keyMapper.apply(key), o);
              }
          } else if (object instanceof Collection) {
              Collection collection = (Collection) object;
              for (Object o : collection) {
                  modifyKeys(o, keyMapper, toReplace);
              }
          }
          return object;
      }