code: def get_package_modules(packagename):
      
      if is_frozen():
          # find modules in library.zip filename
          zipname = os.path.dirname(os.path.dirname(__file__))
          parentmodule = os.path.basename(os.path.dirname(__file__))
          with zipfile.ZipFile(zipname, 'r') as f:
              prefix = "%s/%s/" % (parentmodule, packagename)
              modnames = [os.path.splitext(n[len(prefix):])[0]
                for n in f.namelist()
                if n.startswith(prefix) and "__init__" not in n]
      else:
          dirname = os.path.join(os.path.dirname(__file__), packagename)
          modnames = [x[:-3] for x in get_importable_files(dirname)]
      for modname in modnames:
          try:
              name ="..%s.%s" % (packagename, modname)
              yield importlib.import_module(name, __name__)
          except ImportError as msg:
              print("WARN: could not load module %s: %s" % (modname, msg))
docs: Find all valid modules in the given package which must be a folder
      in the same directory as this loader.py module. A valid module has
      a .py extension, and is importable.
      @return: all loaded valid modules
      @rtype: iterator of module