def collect_by_name(self, modcol, name):
if modcol not in self._mod_collections:<EOL><INDENT>self._mod_collections[modcol] = list(modcol.collect())<EOL><DEDENT>for colitem in self._mod_collections[modcol]:<EOL><INDENT>if colitem.name == name:<EOL><INDENT>return colitem<EOL><DEDENT><DEDENT>
Return the collection node for name from the module collection.

        This will search a module collection node for a collection node
        matching the given name.

        :param modcol: a module collection node; see :py:meth:`getmodulecol`

        :param name: the name of the node to return