docs: protected boolean splitChildren( NodeKey key,
                                       EditableDocument document,
                                       EditableArray children,
                                       int targetCountPerBlock,
                                       int tolerance,
                                       boolean isFirst,
                                       String nextBlock ) {
          assert 0 < targetCountPerBlock;
          assert 0 < tolerance;
          assert tolerance < targetCountPerBlock;
          // Calculate the number of blocks that we'll create and the size of the last block ...
          int total = children.size();
          int numFullBlocks = total / targetCountPerBlock;
  
          if (numFullBlocks == 0) {
              // This block doesn't need to be split ...
              return false;
          }
  
          int sizeOfLastBlock = total % targetCountPerBlock;
          if (sizeOfLastBlock < (targetCountPerBlock - tolerance)) {
              // The last block would be too small to be on its own ...
              if (numFullBlocks == 1) {
                  // We would split into one full block and a second too-small block, so there's no point of splitting ...
                  return false;
              }
              // We'll split it into multiple blocks, so we'll just include the children in the last too-small block
              // in the previous block ...
              sizeOfLastBlock = 0;
          }
  
          // The order we do things is important here. The best thing is to create and persist blocks 2...n immediately,
          // and then we can change the first document to have the smaller number of children and to point to the newly-created
          // block 2 (which points to block 3, etc.). This order means that anybody reading the input document never reads an
          // inconsistent set of children.
          int startIndex = targetCountPerBlock;
          int endIndex = 0;
          final String firstNewBlockKey = key.withRandomId().toString();
          String blockKey = firstNewBlockKey;
          for (int n = 1; n != numFullBlocks; ++n) {
              // Create the sublist of children that should be written to a new block ...
              boolean isLast = n == (numFullBlocks - 1);
              endIndex = isLast ? total : (startIndex + targetCountPerBlock);
              EditableArray blockChildren = Schematic.newArray(children.subList(startIndex, endIndex));
  
              // Create the new block, with a key that contains a UUID for the identifier ...
              String nextBlockKey = (isLast) ? nextBlockKey = nextBlock : key.withRandomId().toString();
              EditableDocument blockDoc = Schematic.newDocument();
              EditableDocument childInfo = blockDoc.setDocument(CHILDREN_INFO);
              childInfo.setNumber(BLOCK_SIZE, blockChildren.size());
              if (nextBlockKey != null) {
                  childInfo.setString(NEXT_BLOCK, nextBlockKey);
              }
  
              // Write the children ...
              blockDoc.setArray(CHILDREN, blockChildren);
  
              // Now persist the new document ...
              documentStore.localStore().put(blockKey, blockDoc);
  
              // And get ready for the next block ...
              if (!isLast) {
                  blockKey = nextBlockKey;
                  startIndex = endIndex;
              }
          }
  
          // Now we can update the input document's children and nextBlock reference ...
          EditableArray newChildren = Schematic.newArray(children.subList(0, targetCountPerBlock));
          document.setArray(CHILDREN, newChildren);
          EditableDocument childInfo = document.getDocument(CHILDREN_INFO);
          if (childInfo == null) {
              childInfo = document.setDocument(CHILDREN_INFO);
          }
          childInfo.setNumber(BLOCK_SIZE, newChildren.size());
          childInfo.setString(NEXT_BLOCK, firstNewBlockKey);
  
          if (isFirst && nextBlock == null) {
              // We generated a new last block and we have to update the reference ...
              childInfo.setString(LAST_BLOCK, blockKey);
          }
  
          // Note we never changed the number of children, so we don't need to update 'count'.
          return true;
      }