def splits(self):
        " Return a list with all HSplit/VSplit instances. "
        result = []

        def collect(split):
            result.append(split)

            for item in split:
                if isinstance(item, (HSplit, VSplit)):
                    collect(item)

        collect(self.root)
        return result
def splits ( self ) : result = [ ] def collect ( split ) : result . append ( split ) for item in split : if isinstance ( item , ( HSplit , VSplit ) ) : collect ( item ) collect ( self . root ) return result
Return a list with all HSplit/VSplit instances.