docs: def add_to_package_package_tree(self, root, node_path, pkgnode):
          """
          Adds a package or sub-package tree from an existing package to this package's
          contents.
          """
          if node_path:
              ptr = root
              for node in node_path[:-1]:
                  ptr = ptr.children.setdefault(node, GroupNode(dict()))
              ptr.children[node_path[-1]] = pkgnode
          else:
              if root.children:
                  raise PackageException("Attempting to overwrite root node of a non-empty package.")
              root.children = pkgnode.children.copy()