docs: def ifilter(self, recursive=True, matches=None, flags=FLAGS,
                  forcetype=None):
          """Iterate over nodes in our list matching certain conditions.
  
          If *forcetype* is given, only nodes that are instances of this type (or
          tuple of types) are yielded. Setting *recursive* to ``True`` will
          iterate over all children and their descendants. ``RECURSE_OTHERS``
          will only iterate over children that are not the instances of
          *forcetype*. ``False`` will only iterate over immediate children.
  
          ``RECURSE_OTHERS`` can be used to iterate over all un-nested templates,
          even if they are inside of HTML tags, like so:
  
              >>> code = mwparserfromhell.parse("{{foo}}<b>{{foo|{{bar}}}}</b>")
              >>> code.filter_templates(code.RECURSE_OTHERS)
              ["{{foo}}", "{{foo|{{bar}}}}"]
  
          *matches* can be used to further restrict the nodes, either as a
          function (taking a single :class:`.Node` and returning a boolean) or a
          regular expression (matched against the node's string representation
          with :func:`re.search`). If *matches* is a regex, the flags passed to
          :func:`re.search` are :const:`re.IGNORECASE`, :const:`re.DOTALL`, and
          :const:`re.UNICODE`, but custom flags can be specified by passing
          *flags*.
          """
          gen = self._indexed_ifilter(recursive, matches, flags, forcetype)
          return (node for i, node in gen)