docs: private Map<String, String> flatten(Map<String, ?> input) {
          Map<String, String> result = new HashMap<String, String>();
  
          for (Map.Entry<String, ?> entry : input.entrySet()) {
              for (Map.Entry<String, String> flattened : flatten(entry)) {
                  if (flattened.getValue() != null) {
                      result.put(flattened.getKey(), flattened.getValue());
                  }
              }
          }
  
          return result;
      }