code: def get_module_names(filepath, modpath=None, skipunder=True):
      
  
      if modpath is None:
          modpath = os.path.split(filepath)[-1]
  
      modlst = []
      for ff, name, ispkg in pkgutil.iter_modules([filepath]):
          if not skipunder or name[0] != '_':
              if ispkg:
                  sublst = get_module_names(os.path.join(filepath, name),
                                            modpath + '.' + name,
                                            skipunder=skipunder)
                  if sublst:
                      modlst.extend(sublst)
                  else:
                      modlst.append(modpath + '.' + name)
              else:
                  modlst.append(modpath + '.' + name)
  
      return modlst
docs: Get a list of modules in a package/subpackage.
  
      Parameters
      ----------
      filepath : string
        Filesystem path to the root directory of the package/subpackage
      modpath : string or None, optional (default None)
        Name of package or module path (in the form 'a.b.c') to a
        subpackage
      skipunder : bool, optional (default True)
        Flag indicating whether to skip modules with names with an
        initial underscore
  
      Returns
      -------
      modlist : list
        List of module names