class_docstr: A registry for plugins.
  
  This is a plugin registry that allows plugins to be loaded/registered
  in two ways:
  
  1. Through an explicit call to ``.register(name, value)``.
  2. By looking for other Python packages that are installed and provide
     a setuptools entry point group.
  
  When you create an instance of this class, provide the name of the
  entry point group to use::
  
      reg = PluginRegister('my_entrypoint_group')
class_docstr_tok: ["A","registry","for","plugins",".","This","is","a","plugin","registry","that","allows","plugins","to","be","loaded\/registered","in","two","ways",":","1",".","Through","an","explicit","call","to","``",".register","(","name",",","value",")","``",".","2",".","By","looking","for","other","Python","packages","that","are","installed","and","provide","a","setuptools","entry","point","group",".","When","you","create","an","instance","of","this","class",",","provide","the","name","of","the","entry","point","group","to","use",":",":","reg","=","PluginRegister","(","'my_entrypoint_group","'",")"]
code: def _enable(self, name: str, **options) -> None:
      if name not in self._plugins:
          try:
              (ep,) = [
                  ep
                  for ep in importlib_metadata_get(
                      self.entry_point_group
                  )
                  if ep.name == name
              ]
          except ValueError as err:
              if name in self.entrypoint_err_messages:
                  raise ValueError(
                      self.entrypoint_err_messages[name]
                  ) from err
              else:
                  raise NoSuchEntryPoint(
                      self.entry_point_group, name
                  ) from err
          value = cast(PluginType, ep.load())
          self.register(name, value)
      self._active_name = name
      self._active = self._plugins[name]
      for key in set(options.keys()) & set(
          self._global_settings.keys()
      ):
          self._global_settings[key] = options.pop(key)
      self._options = options
  
imports: from typing import Any, Dict, List, Optional, Generic, TypeVar, cast
  from types import TracebackType
  from importlib.metadata import entry_points
  from toolz import curry
label_desc: Use image node_id 6 for calling the PluginRegistry obj's underlying member method code with example usage: obj._enable(name) without return types