def namedItem(self, name: str) -> Optional[Node]:
        """TODO."""
        for n in self:
            if n.getAttribute('id') == name:
                return n
        for n in self:
            if n.getAttribute('name') == name:
                return n
        return None
def namedItem ( self , name : str ) -> Optional [ Node ] : for n in self : if n . getAttribute ( 'id' ) == name : return n for n in self : if n . getAttribute ( 'name' ) == name : return n return None
TODO.