def add_section(self, view, generator, index=None):
        def with_type(gen):
            def newgen():
                res = gen()
                try:
                    res.set_current_view_type(self.output_type)
                except __HOLE__:
                    pass

                return res
            return newgen

        super(ReportOfType, self).add_section(
            view,
            with_type(generator),
            index
        )
dataset/ETHPy150Open openstack/rack/rack/openstack/common/report/report.py/ReportOfType.add_section