docs: protected void importDocuments(YamlNode imdgRoot) throws Exception {
          YamlMapping rootAsMapping = asMapping(imdgRoot);
          YamlSequence importSeq = rootAsMapping.childAsSequence(ConfigSections.IMPORT.name);
          if (importSeq == null || importSeq.childCount() == 0) {
              return;
          }
  
          for (YamlNode importNode : importSeq.children()) {
              String resource = asScalar(importNode).nodeValue();
              URL url = ConfigLoader.locateConfig(resource);
              if (url == null) {
                  throw new InvalidConfigurationException("Failed to load resource: " + resource);
              }
              if (!currentlyImportedFiles.add(url.getPath())) {
                  throw new InvalidConfigurationException("Cyclic loading of resource '" + url.getPath() + "' detected!");
              }
  
              YamlNode rootLoaded;
              try {
                  rootLoaded = YamlLoader.load(url.openStream());
              } catch (Exception ex) {
                  throw new InvalidConfigurationException("Loading YAML document from resource " + url.getPath() + " failed", ex);
              }
  
              YamlNode imdgRootLoaded = asMapping(rootLoaded).child(getConfigRoot());
              if (imdgRootLoaded == null) {
                  return;
              }
  
              replaceVariables(asW3cNode(imdgRootLoaded));
              importDocuments(imdgRootLoaded);
  
              // we need to merge and not just substitute with the content of the imported document
              // YAML documents define mappings where the name of the nodes should be unique
              merge(imdgRootLoaded, imdgRoot);
          }
  
          ((MutableYamlMapping) rootAsMapping).removeChild(ConfigSections.IMPORT.name);
      }