Create a map of name to child based on a list.
    :param children [LocalFolder/LocalFile] list of children:
    :return: map child.name -> child
558368
def _name_to_child_map(children):
    
    name_to_child = {}
    for child in children:
        name_to_child[child.name] = child
    return name_to_child
1118180
def children_resources(parent_id)
      http_get(url('/resources/%s/children', parent_id))['results'].map { |r| Resource.new(r) }
    end
1058318
def children(*names)
      define_remaining_children(names)

      names.each_with_index do |name, index|
        define_child(name, index)
      end
    end
509110
def mkdir(self, children, mode=0o0755, return_node=True):
        
        result = None

        if isinstance(children, (str, unicode)):
            if os.path.isabs(children):
                raise BadValueError('Cannot mkdir an absolute path: {path}'.format(path=self._pyerarchy_path))

            rel_path = os.path.join(self._pyerarchy_path, children)
            os.makedirs(rel_path, mode)

            if return_node:
                result = Node(rel_path)
        else:
            for child in children:
                self.mkdir(child, mode, False)

        return result
124937
public Iterable<XElement> childrenWithName(String name) {
        List<XElement> result = new ArrayList<>(children.size() + 1);
        for (XElement e : children) {
            if (e.name.equals(name)) {
                result.add(e);
            }
        }
        return result;
    }
1166757
def to_child_hash
      hash = {}
      children { |child| hash[child.name] = child.value }
      return hash
    end
533002
def call(self, node, children):
        ''
        name, _, arguments, _ = children
        return name(*arguments)
498098
def set_children(self, children):
        """"""
        if isinstance(children, tuple):
            self._children = list(children)
        else:
            self._children = [children]
        return self
1103607
def as_list(self):
        """"""
        return [self.name, self.value, [x.as_list for x in self.children]]
1278697
def find(self, name):
        
        for c in self.children:
            if c.name == name:
                return c
            result = c.find(name)
            if result:
                return result
405712
def start(self, children):
        

        composites = []

        for composite_dict in children:
            if False and self.include_position:
                key_token = composite_dict[1]
                key_name = key_token.value.lower()
                composites_position = self.get_position_dict(composite_dict)
                composites_position[key_name] = self.create_position_dict(key_token, None)

            composites.append(composite_dict)

        # only return a list when there are multiple root composites (e.g.
        # several CLASSes)
        if len(composites) == 1:
            return composites[0]
        else:
            return composites
345509
def recursive_children(self):
        

        for child in self.children:
            yield child

            for recursive_child in child.recursive_children:
                yield recursive_child
708860
def add_child(*names)
      names.flatten!
      return unless name = names.shift
      node = children.find { |c| c.name == name }
      node ? node.add_child(names) : (children << TreeNode.new(name, names))
    end
591317
def children_and_parameters(m:nn.Module):
    ""
    children = list(m.children())
    children_p = sum([[id(p) for p in c.parameters()] for c in m.children()],[])
    for p in m.parameters():
        if id(p) not in children_p: children.append(ParameterModule(p))
    return children
453666
def children(self):
        

        if isinstance(self.content, list):
            return self.content
        elif isinstance(self.content, Element):
            return [self.content]
        else:
            return []
203657
def children(self, alias, bank_id):
        
        return self._root + self._safe_alias(alias) + '/child/ids/' + str(bank_id)
865791
def make_callback_children(self, name, *args, **kwdargs):
        
        if hasattr(self, 'objects'):
            # Invoke callbacks on all our layers that have the UI mixin
            num = len(self.objects) - 1
            while num >= 0:
                obj = self.objects[num]
                if isinstance(obj, Callbacks):
                    obj.make_callback(name, *args, **kwdargs)
                num -= 1

        return super(UIMixin, self).make_callback(name, *args, **kwdargs)