:param children_nodes: A list of child dict objects
    :param options: Keyword options, see :func:`container_to_etree`
974277
def _elem_from_descendants(children_nodes, **options):
    
    for child in children_nodes:  # child should be a dict-like object.
        for ckey, cval in anyconfig.compat.iteritems(child):
            celem = ET.Element(ckey)
            container_to_etree(cval, parent=celem, **options)
            yield celem
921165
function resolveNodeSlots (
  children,
  context
) {
  const slots = {}

  const defaultSlot = []
  for (let i = 0, l = children.length; i < l; i++) {
    const child = children[i]
    const name = child.getAttribute && child.getAttribute('slot')

    if (name) {
      const slot = (slots[name] || (slots[name] = []))
      if (child.tagName === 'TEMPLATE') {
        slot.push.apply(slot, child.content.childNodes)
      } else {
        slot.push(child)
      }
      child.removeAttribute('slot')
    } else {
      defaultSlot.push(child)
    }
  }

  slots.default = defaultSlot

  return slots
}
533002
def call(self, node, children):
        ''
        name, _, arguments, _ = children
        return name(*arguments)
1121698
def iter_child_nodes(node):
    """"""
    for name, field in iter_fields(node):
        if isinstance(field, AST):
            yield field
        elif isinstance(field, list):
            for item in field:
                if isinstance(item, AST):
                    yield item
453666
def children(self):
        

        if isinstance(self.content, list):
            return self.content
        elif isinstance(self.content, Element):
            return [self.content]
        else:
            return []
1079065
function(children, options){
			children = (children || []).slice(0).sort(sortChildren);
			var res = "";
			children.forEach(function(child){
				res += options.fn(child)
			});
			return res;
		}
249132
def nodes(self):
        
        resource = sub_collection(
            self.get_relation('vss_container_node'), 
            VSSContainerNode) 
        resource._load_from_engine(self, 'nodes') 
        return resource
241595
def to_etree(self):
        
        layers_attrib_val = ' '.join('//@layers.{}'.format(layer_id)
                                     for layer_id in self.layers)

        attribs = {
            '{{{pre}}}type'.format(pre=NAMESPACES['xsi']): self.xsi_type,
            'layers': layers_attrib_val}

        E = ElementMaker()
        node = E('nodes', attribs)
        label_elements = (label.to_etree() for label in self.labels)
        node.extend(label_elements)
        return node
948875
def process_children(self, node, parent, pmod):
        
        for ch in node.i_children:
            if ch.keyword in ["rpc", "notification"]: continue
            if ch.keyword in ["choice", "case"]:
                self.process_children(ch, parent, pmod)
                continue
            if ch.i_module.i_modulename == pmod:
                nmod = pmod
                nodename = ch.arg
            else:
                nmod = ch.i_module.i_modulename
                nodename = "%s:%s" % (nmod, ch.arg)
            ndata = [ch.keyword]
            if ch.keyword == "container":
                ndata.append({})
                self.process_children(ch, ndata[1], nmod)
            elif ch.keyword == "list":
                ndata.append({})
                self.process_children(ch, ndata[1], nmod)
                ndata.append([(k.i_module.i_modulename, k.arg)
                              for k in ch.i_key])
            elif ch.keyword in ["leaf", "leaf-list"]:
                ndata.append(self.base_type(ch.search_one("type")))
            modname = ch.i_module.i_modulename
            parent[nodename] = ndata
1061177
def children(self) :
        ""
        if not self.isdir() : raise Exception("FSQuery tried to return the children of a node which is not a directory : %s" % self.abs)
        return [FSNode(self.abs + "/" + x,self.root,self.depth+1) for x in os.listdir(self.abs)]
949204
def get_children(self, request):
        
        node = decode_node(request.data)
        return _get_children(node, request.depth)
254582
def add_node(node, parent):
    '''
    '''
    newNode = dict(node_id=node.id, children=[])
    parent["children"].append(newNode)
    if node.left: add_node(node.left, newNode)
    if node.right: add_node(node.right, newNode)
253591
def etree(self, data, root=None):
        ''''''
        result = self.list() if root is None else root
        if isinstance(data, (self.dict, dict)):
            for key, value in data.items():
                value_is_list = isinstance(value, (self.list, list))
                value_is_dict = isinstance(value, (self.dict, dict))
                # Add attributes and text to result (if root)
                if root is not None:
                    # Handle attribute prefixes (BadgerFish)
                    if self.attr_prefix is not None:
                        if key.startswith(self.attr_prefix):
                            key = key.lstrip(self.attr_prefix)
                            # @xmlns: {$: xxx, svg: yyy} becomes xmlns="xxx" xmlns:svg="yyy"
                            if value_is_dict:
                                raise ValueError('XML namespaces not yet supported')
                            else:
                                result.set(key, self._tostring(value))
                            continue
                    # Handle text content (BadgerFish, GData)
                    if self.text_content is not None:
                        if key == self.text_content:
                            result.text = self._tostring(value)
                            continue
                    # Treat scalars as text content, not children (GData)
                    if self.attr_prefix is None and self.text_content is not None:
                        if not value_is_dict and not value_is_list:
                            result.set(key, self._tostring(value))
                            continue
                # Add other keys as one or more children
                values = value if value_is_list else [value]
                for value in values:
                    elem = self.element(key)
                    if elem is None:
                        continue
                    result.append(elem)
                    # Treat scalars as text content, not children (Parker)
                    if not isinstance(value, (self.dict, dict, self.list, list)):
                        if self.text_content:
                            value = {self.text_content: value}
                    self.etree(value, root=elem)
        else:
            if self.text_content is None and root is not None:
                root.text = self._tostring(data)
            else:
                elem = self.element(self._tostring(data))
                if elem is not None:
                    result.append(elem)
        return result
244056
def _child(details):
	

	# If the details are a list
	if isinstance(details, list):

		# Create a list of options for the key
		return OptionsNode(details)

	# Else if we got a dictionary
	elif isinstance(details, dict):

		# If array is present
		if '__array__' in details:
			return ArrayNode(details)

		# Else if we have a hash
		elif '__hash__' in details:
			return HashNode(details)

		# Else if we have a type
		elif '__type__' in details:

			# If the type is a dictionary or list, this is a complex type
			if isinstance(details['__type__'], (dict,list)):
				return _child(details['__type__'])

			# Else it's just a Node
			else:
				return Node(details)

		# Else it's most likely a parent
		else:
			return Parent(details)

	# Else if we got a string
	elif isinstance(details, basestring):

		# Use the value as the type
		return Node(details)

	# Else raise an error
	else:
		raise TypeError('details')
454334
def _get_all_children(self,):
        
        res = ''
        if self.child_nodes:
            for c in self.child_nodes:
                res += ' child = ' + str(c) + '\n'
                if c.child_nodes:
                    for grandchild in c.child_nodes:
                        res += '   child = ' + str(grandchild) + '\n'
        else:
            res += ' child = None\n'
        return res
852640
def _nodes(self, tree):
        
        def recourse(temp_tree_, nodes):
            if isinstance(temp_tree_, dict):
                if temp_tree_['split'] != -1:
                    nodes.append(temp_tree_['node'])
                    if temp_tree_['split'] != -1:
                        for k in ['sl', 'sr']:
                            recourse(temp_tree_[k], nodes)
            return None

        nodes_ = []
        recourse(tree, nodes_)
        return nodes_
256963
function ListNode (children) {
    for(var i = 0; i < children.length; i++)
        this[i] = children[i];
    this.length = children.length;
}