docs: def build_from_node(package, node):
      """
      Compile a Quilt data package from an existing package node.
      """
      team, owner, pkg, subpath = parse_package(package, allow_subpath=True)
      _check_team_id(team)
      store = PackageStore()
  
      pkg_root = get_or_create_package(store, team, owner, pkg, subpath)
  
      if not subpath and not isinstance(node, nodes.GroupNode):
          raise CommandException("Top-level node must be a group")
  
      def _process_node(node, path):
          if not isinstance(node._meta, dict):
              raise CommandException(
                  "Error in %s: value must be a dictionary" % '.'.join(path + ['_meta'])
              )
          meta = dict(node._meta)
          system_meta = meta.pop(SYSTEM_METADATA, {})
          if not isinstance(system_meta, dict):
              raise CommandException(
                  "Error in %s: %s overwritten. %s is a reserved metadata key. Try a different key." %
                  ('.'.join(path + ['_meta']), SYSTEM_METADATA, SYSTEM_METADATA)
              )
          if isinstance(node, nodes.GroupNode):
              store.add_to_package_group(pkg_root, path, meta)
              for key, child in node._items():
                  _process_node(child, path + [key])
          elif isinstance(node, nodes.DataNode):
              # TODO: Reuse existing fragments if we have them.
              data = node._data()
              filepath = system_meta.get('filepath')
              transform = system_meta.get('transform')
              if isinstance(data, pd.DataFrame):
                  store.add_to_package_df(pkg_root, data, path, TargetType.PANDAS, filepath, transform, meta)
              elif isinstance(data, np.ndarray):
                  store.add_to_package_numpy(pkg_root, data, path, TargetType.NUMPY, filepath, transform, meta)
              elif isinstance(data, string_types):
                  store.add_to_package_file(pkg_root, data, path, TargetType.FILE, filepath, transform, meta)
              else:
                  assert False, "Unexpected data type: %r" % data
          else:
              assert False, "Unexpected node type: %r" % node
  
      try:
          _process_node(node, subpath)
      except StoreException as ex:
          raise CommandException("Failed to build the package: %s" % ex)
  
      store.save_package_contents(pkg_root, team, owner, pkg)