code: def filterCollapsedItems(data):
    
    return ((key, value)\
            for key, value in six.iteritems(data) \
            if not (isinstance(value, StatContainer) and value.isCollapsed()))
docs: Return a filtered iteration over a list of items.