code: def nodes_of_class(self, klass, skip_klass=None):
          
          if isinstance(self, klass):
              yield self
  
          if skip_klass is None:
              for child_node in self.get_children():
                  yield from child_node.nodes_of_class(klass, skip_klass)
  
              return
  
          for child_node in self.get_children():
              if isinstance(child_node, skip_klass):
                  continue
              yield from child_node.nodes_of_class(klass, skip_klass)
docs: 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)