def METHOD_NAME(self, fullname, *args, **kwargs):
    with _module_to_load(fullname) as module:
        module.__loader__ = self
        try:
            is_package = self.is_package(fullname)
        except (ImportError, AttributeError):
            pass
        else:
            if is_package:
                module.__package__ = fullname
            else:
                module.__package__ = fullname.rpartition('.')[0]
        # If __package__ was not set above, __import__() will do it later.
        return fxn(self, module, *args, **kwargs)