docs: def _load_plugins(namespace, instantiate=True):
      """
      Loads all the plugins for the given namespace
  
      Args:
          namespace(str): Namespace string, as in the setuptools entry_points
          instantiate(bool): If true, will instantiate the plugins too
  
      Returns:
          dict of str, object: Returns the list of loaded plugins
      """
      mgr = ExtensionManager(
          namespace=namespace,
          on_load_failure_callback=(
              lambda _, ep, err: LOGGER.
              warning('Could not load plugin {}: {}'.format(ep.name, err))
          )
      )
      if instantiate:
          plugins = dict(
              (
                  ext.name,
                  ext.plugin if isinstance(ext.plugin, Plugin) else ext.plugin()
              ) for ext in mgr
          )
      else:
          plugins = dict((ext.name, ext.plugin) for ext in mgr)
  
      return plugins