code: def get_plugins(metadata):
      
      plugins = load_plugins()
      if not plugins:
          raise NoPluginsError('No plugins found')
  
      results = []
      for p in sorted(plugins.get_all(), key=attrgetter('name')):
          if metadata:
              data = {'name': p.name, 'homepage': p.homepage}
              hints = getattr(p, 'hints', [])
              if hints:
                  data['hints'] = hints
              results.append(data)
          else:
              results.append(p.name)
      return results
docs: Return the registered plugins.
  
      Load and return all registered plugins.