code: def load(self, root, module_path, pkg_name):
          
          root = os.path.join(root, module_path)
          import_name = os.path.join(pkg_name, module_path).replace(os.sep, '.')
          for (_, name, _) in pkgutil.iter_modules([root]):
              self.modules[name] = import_module('.' + name, package=import_name)
          return self.modules
docs: Load modules dynamically.