code: def _load_plugin_class(menu, name):
      
      group = 'custodia.{}'.format(menu)
      eps = list(pkg_resources.iter_entry_points(group, name))
      if len(eps) > 1:
          raise ValueError(
              "Multiple entry points for {} {}: {}".format(menu, name, eps))
      elif len(eps) == 1:
          # backwards compatibility with old setuptools
          ep = eps[0]
          if hasattr(ep, 'resolve'):
              return ep.resolve()
          else:
              return ep.load(require=False)
      elif '.' in name:
          # fall back to old style dotted name
          module, classname = name.rsplit('.', 1)
          m = importlib.import_module(module)
          return getattr(m, classname)
      else:
          raise ValueError("{}: {} not found".format(menu, name))
docs: Load Custodia plugin
  
      Entry points are preferred over dotted import path.