code: def get_roots(app=None):
      '''
      Returns the list of root packages/modules exposing endpoints.
  
      If app is provided, only returns those of enabled plugins
      '''
      roots = set()
      plugins = app.config['PLUGINS'] if app else None
      for name in ENTRYPOINTS.keys():
          for ep in iter_all(name):
              if plugins is None or ep.name in plugins:
                  roots.add(ep.module_name.split('.', 1)[0])
      return list(rootsf get_roots(app=None):
      '''
      Returns the list of root packages/modules exposing endpoints.
  
      If app is provided, only returns those of enabled plugins
      '''
      roots = set()
      plugins = app.config['PLUGINS'] if app else None
      for name in ENTRYPOINTS.keys():
          for ep in iter_all(name):
              if plugins is None or ep.name in plugins:
                  roots.add(ep.module_name.split('.', 1)[0])
      return list(roots)
docs: Returns the list of root packages/modules exposing endpoints.
  
      If app is provided, only returns those of enabled plugins