docs: NodeDefinitionSet findChildNodeDefinitions( Name primaryTypeNameOfParent,
                                                  Set<Name> mixinTypeNamesOfParent ) {
          // See if this is the same parent primaryType & mixins that we just used. This is often the case for a session
          // adding multiple children to the same parent ...
          ReusableNodeDefinitionSet lastDefnSet = nodeDefinitionSet.get();
          if (lastDefnSet.appliesTo(this, primaryTypeNameOfParent, mixinTypeNamesOfParent)) return lastDefnSet;
  
          Set<Name> mixinsWithChildDefns = mixinsWithChildNodeDefinitions(mixinTypeNamesOfParent);
  
          // If this is one of the special built-in cases ...
          for (ReusableNodeDefinitionSet defnSet : standardNodeDefinitionSets) {
              if (defnSet.appliesTo(this, primaryTypeNameOfParent, mixinsWithChildDefns)) {
                  return use(defnSet);
              }
          }
  
          // Go through the primary type ...
          JcrNodeType primaryType = getNodeType(primaryTypeNameOfParent);
          assert primaryType != null;
          Collection<JcrNodeDefinition> defns = primaryType.allChildNodeDefinitions();
          if (mixinsWithChildDefns.isEmpty()) {
              if (defns.isEmpty()) {
                  // No child node definitions ...
                  return use(new NoChildrenNodeDefinitionSet(primaryTypeNameOfParent, mixinsWithChildDefns));
              }
              if (defns.size() == 1) {
                  JcrNodeDefinition defn = defns.iterator().next();
                  return use(new SingleNodeDefinitionSet(primaryTypeNameOfParent, mixinsWithChildDefns, defn));
              }
              // There are multiple child node definitions in the primary type, and no mixins with child node defns ...
              return use(new MultipleNodeDefinitionSet(primaryTypeNameOfParent, null));
          }
  
          // There is a primary type and at least one mixin with child node definitions ...
          return use(new MultipleNodeDefinitionSet(primaryTypeNameOfParent, mixinsWithChildDefns));
      }