def nodes_of_class(self, klass, skip_klass=None):
if isinstance(self, klass):<EOL><INDENT>yield self<EOL><DEDENT>if skip_klass is None:<EOL><INDENT>for child_node in self.get_children():<EOL><INDENT>yield from child_node.nodes_of_class(klass, skip_klass)<EOL><DEDENT>return<EOL><DEDENT>for child_node in self.get_children():<EOL><INDENT>if isinstance(child_node, skip_klass):<EOL><INDENT>continue<EOL><DEDENT>yield from child_node.nodes_of_class(klass, skip_klass)<EOL><DEDENT>
Get the nodes (including this one or below) of the given type.

        :param klass: The type of node to search for.
        :type klass: builtins.type

        :param skip_klass: A type of node to ignore. This is useful to ignore
            subclasses of :attr:`klass`.
        :type skip_klass: builtins.type

        :returns: The node of the given type.
        :rtype: iterable(NodeNG)