def yield_type(iterable_obj):
        """Yield items of specific types.

        If the iterable object contains iterable items,
        we may further iterate over those as well,
        depending on whether they meet specific conditions.

        That is, this generator may iterate recursively.

        Parameters
        ==========
        iterable_obj (any iterable instance)
            object over which to iterate.
        """
        ### iterate over the items in the given iterable,
        ### yielding the wanted items and further iterating
        ### the item's contents when appropriate

        for item in iterable_obj:

            ### if the item is of one of the desired types
            ### and not of one of the undesired ones,
            ### yield it

            if isinstance(item, types_to_yield) and not isinstance(
                item, types_to_ignore
            ):
                yield item

            ### otherwise, if the item can be subject to
            ### iteration without incurring in recursion
            ### and its type is not listed among those
            ### not to be iterated, we must try to yield
            ### from it

            elif (
                ## item must be iterable
                isinstance(item, Iterable)
                ## and its type must not be listed among
                ## those not to be iterated
                and not isinstance(item, types_not_to_iterate)
                ## also, to prevent recursion in iterable
                ## classes whose items are also iterables,
                ## like strings, the item must also be
                ## different from the iterable itself
                and item != iterable_obj
            ):
                yield from yield_type(item)

            ### since the two conditional branches above
            ### (the "if block" and "elif block") are the
            ### only scenarios of interest, no "else clause"
            ### is needed;
Yield items of specific types.

        If the iterable object contains iterable items,
        we may further iterate over those as well,
        depending on whether they meet specific conditions.

        That is, this generator may iterate recursively.

        Parameters
        ==========
        iterable_obj (any iterable instance)
            object over which to iterate.
        
nodezator/ourstdlibs/iterutils.py