def run_as_package_in_namespace(self, prof):
        """Runs program as package in Python namespace."""
        import runpy
        prof.enable()
        try:
            runpy.run_module(self._run_object, run_name='__main__')
        except ImportError:
            raise RuntimeProfilerRunError(
                'Unable to run package %s' % self._run_object)
        except SystemExit:
            pass
        finally:
            prof.disable()
        self._object_name = self._run_object
dataset/ETHPy150Open nvdv/vprof/vprof/runtime_profile.py/RuntimeProfile.run_as_package_in_namespace/original