Creates the given node, regardless of whether or not it already
        exists.
        Returns the new node.
14127
def create(self, path, data=None):
        
        node = self.current[-1]
        path = self._splitpath(path)
        n_items = len(path)
        for n, item in enumerate(path):
            tag, attribs = self._splittag(item)

            # The leaf node is always newly created.
            if n == n_items-1:
                node = node.add(Node(tag, attribs))
                break

            # Parent nodes are only created if they do not exist yet.
            existing = node.get_child(tag, attribs)
            if existing is not None:
                node = existing
            else:
                node = node.add(Node(tag, attribs))
        if data:
            node.text = unquote(data)
        return node
331011
def node(self):
        

        if self.node_class is None:
            raise ValueError("You have to create an ``Item`` by calling ``__init__`` with ``node_class`` argument"
                             " or by decorating a ``Node`` class.")

        node = self.node_class(*self.node_args, **self.node_kwargs)
        node.__item__ = self

        return node
109574
def add_node(self, node):
        """"""
        nodes = self.nodes()

        if len(nodes) > 1:
            first_node = min(nodes, key=attrgetter("creation_time"))
            first_node.connect(direction="both", whom=node)
192351
def make_node(name, value=nil, attributes={})
      node = Ox::Element.new(name)

      node << value unless value.nil?
      attributes.each { |att, val| node[att] = val } unless attributes.empty?
      
      node
    end
882636
def init_node(cls, *args, **kwargs):
    
    node = cls()
    for name, value in zip(cls._fields, args):
        setattr(node, name, value)
    for name, value in kwargs:
        setattr(node, name, value)
    return node
854536
def CreateFromDOM(node, default_namespace=None):
    
    if default_namespace is None:
        default_namespace = Namespace.fallbackNamespace()
    return pyxb.binding.basis.element.AnyCreateFromDOM(node, default_namespace)
1290320
static void createIfNotThere(ZooKeeper zookeeper, String znode) throws KeeperException, InterruptedException {
        try {
            create(zookeeper, znode);
        } catch (KeeperException e) {
            if (e.code() != KeeperException.Code.NODEEXISTS) {
                // Rethrow all exceptions, except "node exists",
                // because if the node exists, this method reached its goal.
                throw e;
            }
        }
    }
411079
function _new_node_at(bnode, level){

	ll("adding " + bnode.id() + " at level " + level + "!");

	// Create new vertex and add to set.
	var new_vertex = new bbop.layout.sugiyama.simple_vertex(bnode.id());
	new_vertex.level = level;
	vertex_set[ new_vertex.id() ] = new_vertex;
	
	// Check the node in to the 'seen' references.
	first_seen_reference[ new_vertex.id() ] = level;
	last_seen_reference[ new_vertex.id() ] = level;		 
    }
1056926
def _add_node(self, node):
        
        node_id = len(self.node_list)
        self.node_to_id[node] = node_id
        self.node_list.append(node)
        self.adj_list[node_id] = []
        self.reverse_adj_list[node_id] = []
        return node_id
393321
public static NodeWrapper newInstance(final BoltDatabaseService db, final org.neo4j.driver.v1.types.Node node) {

		synchronized (nodeCache) {

			NodeWrapper wrapper = nodeCache.get(node.id());
			if (wrapper == null || wrapper.stale) {

				wrapper = new NodeWrapper(db, node);
				nodeCache.put(node.id(), wrapper);
			}

			return wrapper;
		}
	}
516933
def cloneNode(self, deep: bool=False) -> AbstractNode:
        
        if deep:
            return self._clone_node_deep()
        return self._clone_node()
1339376
def make_node(cls, *args):
        
        new_args = []

        args = [x for x in args if not is_null(x)]
        for x in args:
            assert isinstance(x, Symbol)
            if x.token == 'BLOCK':
                new_args.extend(SymbolBLOCK.make_node(*x.children).children)
            else:
                new_args.append(x)

        result = SymbolBLOCK(*new_args)
        return result
302818
function(node) {
			var newNode = node.cloneNode(true);
			if(this.hasAttribute(node, 'id')){
				this.removeAttribute(node, 'id')
			}
			return newNode;
		}
189294
def append(self, node):
        ""
        if not isinstance(node, self.__class__):
            raise TypeError('Expected Node instance, got %r' % node)
        self.nodes.append(node)
653660
def make_node(cls, node, *args):
        ''' 
        '''
        if node is None:
            return cls.make_node(SymbolBOUNDLIST(), *args)

        if node.token != 'BOUNDLIST':
            return cls.make_node(None, node, *args)

        for arg in args:
            if arg is None:
                continue
            node.appendChild(arg)

        return node
611849
def add_node(self, name, desc, layout, node_x, node_y):
        
        existing_node = get_session().query(Node).filter(Node.name==name, Node.network_id==self.id).first()
        if existing_node is not None:
            raise HydraError("A node with name %s is already in network %s"%(name, self.id))

        node = Node()
        node.name        = name
        node.description = desc
        node.layout      = str(layout) if layout is not None else None
        node.x           = node_x
        node.y           = node_y

        #Do not call save here because it is likely that we may want
        #to bulk insert nodes, not one at a time.

        get_session().add(node)

        self.nodes.append(node)

        return node
500285
def newDocRawNode(self, ns, name, content):
        
        if ns is None: ns__o = None
        else: ns__o = ns._o
        ret = libxml2mod.xmlNewDocRawNode(self._o, ns__o, name, content)
        if ret is None:raise treeError('xmlNewDocRawNode() failed')
        __tmp = xmlNode(_obj=ret)
        return __tmp