def METHOD_NAME(self, fullname):
    # Create an empty module
    mod = sys.modules.setdefault(fullname, imp.new_module(fullname))
    mod.__file__ = "<%s>" % self.__class__.__name__
    mod.__loader__ = self
    # Make it a package
    mod.__path__ = []
    # Count how many times the module is reloaded
    mod.__dict__['loads'] = mod.__dict__.get('loads',0) + 1
    return mod