code: def load_extension(self, path, name_filter=None, class_filter=None, unique=False, component=None):
          import_name = None
          if component is not None:
              import_name = _ensure_package_loaded(path, component)
          name, ext = _try_load_module(path, import_name=import_name)
          if name_filter is not None and name != name_filter:
              return []
          found = [(name, x) for x in self._filter_subclasses(ext, class_filter)]
          found = [(name, x) for name, x in found if self._filter_nonextensions(x)]
          if not unique:
              return found
          if len(found) > 1:
              raise ArgumentError("Extension %s should have had exactly one instance of class %s, found %d"
                                  % (path, class_filter.__name__, len(found)), classes=found)
          elif len(found) == 0:
              raise ArgumentError("Extension %s had no instances of class %s" % (path, class_filter.__name__))
          return found[0]