def getDirtyVisibleComponents(self, w):
        resultset = list(self._dirtyPaintables)

        # The following algorithm removes any components that would be painted
        # as a direct descendant of other components from the dirty components
        # list. The result is that each component should be painted exactly
        # once and any unmodified components will be painted as "cached=true".

        for p in self._dirtyPaintables:
            if isinstance(p, IComponent):
                component = p
                if component.getApplication() is None:
                    # component is detached after requestRepaint is called
                    resultset.remove(p)
                    self._dirtyPaintables.remove(p)
                else:
                    componentsRoot = component.getWindow()
                    if componentsRoot is None:
                        # This should not happen unless somebody has overriden
                        # getApplication or getWindow in an illegal way.
                        raise ValueError('component.getWindow() returned null '
                                'for a component attached to the application')

                    if componentsRoot.getParent() is not None:
                        # this is a subwindow
                        componentsRoot = componentsRoot.getParent()

                    if componentsRoot != w:
                        resultset.remove(p)
                    elif ((component.getParent() is not None)
                            and not component.getParent().isVisible()):
                        # Do not return components in an invisible subtree.
                        #
                        # Components that are invisible in visible subree, must
                        # be rendered (to let client know that they need to be
                        # hidden).
                        resultset.remove(p)

        return resultset
Prints out what's in the Map.
dataset/ETHPy150Open rwl/muntjac/muntjac/terminal/gwt/server/abstract_communication_manager.py/AbstractCommunicationManager.getDirtyVisibleComponents--crossover with--dataset/ETHPy150Open Akagi201/learning-python/lpthw/ex39/hashmap.py/list