def METHOD_NAME(self):
    # If a module injects something into sys.modules as a side-effect, then
    # pick up on that fact.
    name = 'mod'
    subname = name + '.b'
    def module_injection():
        sys.modules[subname] = 'total bunk'
    mock_spec = util.mock_spec('mod',
                                     module_code={'mod': module_injection})
    with mock_spec as mock:
        with util.import_state(meta_path=[mock]):
            try:
                submodule = self.__import__(subname)
            finally:
                support.unload(subname)