code: def add(self, node):
          
          if node.parent_id != _node.Root.ID:
              raise exception.InvalidException('Not a top level node')
  
          self._nodes[node.id] = node
          self._nodes[node.parent_id].append(node, False)
docs: Register a top level node (and its children) for syncing up to the server. There's no need to call this for nodes created by
          :py:meth:`createNote` or :py:meth:`createList` as they are automatically added.
  
              LoginException: If :py:meth:`login` has not been called.
          Args:
              node (gkeepapi.node.Node): The node to sync.
  
          Raises:
              Invalid: If the parent node is not found.