'Create a module for a particular package.
This caches the module within this Repo *instance*.  It does
*not* add it to ``sys.modules``.  So, you can construct
multiple Repos for testing and ensure that the module will be
loaded once per repo.'

def _get_pkg_module(self, pkg_name):

    if (pkg_name not in self._modules):
        file_path = self.filename_for_package_name(pkg_name)
        if (not os.path.exists(file_path)):
            raise UnknownPackageError(pkg_name, self)
        if (not os.path.isfile(file_path)):
            tty.die(("Something's    wrong.    '%s'    is    not    a    file!" % file_path))
        if (not os.access(file_path, os.R_OK)):
            tty.die(("Cannot    read    '%s'!" % file_path))
        fullname = ('%s.%s' % (self.full_namespace, pkg_name))
        module = imp.load_source(fullname, file_path)
        module.__package__ = self.full_namespace
        module.__loader__ = self
        self._modules[pkg_name] = module
    return self._modules[pkg_name]
