code: def find_modules(self, path, prefix):
          
  
          modules = set([prefix])
  
          # https://docs.python.org/2/library/pkgutil.html#pkgutil.iter_modules
          for module_info in pkgutil.iter_modules([path]):
              # we want to ignore any "private" modules
              if module_info[1].startswith('_'): continue
  
              module_prefix = ".".join([prefix, module_info[1]])
              if module_info[2]:
                  # module is a package
                  submodules = self.find_modules(os.path.join(path, module_info[1]), module_prefix)
                  modules.update(submodules)
              else:
                  modules.add(module_prefix)
  
          return modules
docs: recursive method that will find all the submodules of the given module
          at prefix with path