@classmethod
def exec_module(cls, module):
    """Execute the module."""
    code = cls.get_code(module.__name__)
    if code is None:
        raise ImportError(
            'cannot load module {!r} when get_code() returns None'.format(
            module.__name__))
    cls._call_with_frames_removed(exec, code, module.__dict__)
