docs: def modgen(
          module, entry_point,
          modpath='pkg_resources', globber='root', fext=JS_EXT,
          registry=_utils):
      """
      JavaScript styled module location listing generator.
  
      Arguments:
  
      module
          The Python module to start fetching from.
  
      entry_point
          This is the original entry point that has a distribution
          reference such that the resource_filename API call may be used
          to locate the actual resources.
  
      Optional Arguments:
  
      modpath
          The name to the registered modpath function that will fetch the
          paths belonging to the module.  Defaults to 'pkg_resources'.
  
      globber
          The name to the registered file globbing function.  Defaults to
          one that will only glob the local path.
  
      fext
          The filename extension to match.  Defaults to `.js`.
  
      registry
          The "registry" to extract the functions from
  
      Yields 3-tuples of
  
      - raw list of module name fragments
      - the source base path to the python module (equivalent to module)
      - the relative path to the actual module
  
      For each of the module basepath and source files the globber finds.
      """
  
      globber_f = globber if callable(globber) else registry['globber'][globber]
      modpath_f = modpath if callable(modpath) else registry['modpath'][modpath]
  
      logger.debug(
          'modgen generating file listing for module %s',
          module.__name__,
      )
  
      module_frags = module.__name__.split('.')
      module_base_paths = modpath_f(module, entry_point)
  
      for module_base_path in module_base_paths:
          logger.debug('searching for *%s files in %s', fext, module_base_path)
          for path in globber_f(module_base_path, '*' + fext):
              mod_path = (relpath(path, module_base_path))
              yield (
                  module_frags + mod_path[:-len(fext)].split(sep),
                  module_base_path,
                  mod_path,
              )