def run_as_package_in_namespace(self):
        """Runs program as package in Python namespace."""
        import runpy
        pkg_code = base_profile.get_package_code(self._run_object)
        with CodeHeatmapCalculator() as prof:
            for _, compiled_code in pkg_code.values():
                prof.add_code(compiled_code)
            try:
                runpy.run_module(self._run_object)
            except ImportError:
                raise CodeHeatmapRunError(
                    'Unable to run package %s' % self._run_object)
            except __HOLE__:
                pass
        return self._consodalidate_stats(pkg_code, prof)
dataset/ETHPy150Open nvdv/vprof/vprof/code_heatmap.py/CodeHeatmapProfile.run_as_package_in_namespace