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]
docs: Load a single python module extension.
  
          This function is similar to using the imp module directly to load a
          module and potentially inspecting the objects it declares to filter
          them by class.
  
          Args:
              path (str): The path to the python file to load
              name_filter (str): If passed, the basename of the module must match
                  name or nothing is returned.
              class_filter (type): If passed, only instance of this class are returned.
              unique (bool): If True (default is False), there must be exactly one object
                  found inside this extension that matches all of the other criteria.
              component (IOTile): The component that this extension comes from if it is
                  loaded from an installed component.  This is used to properly import
                  the extension as a submodule of the component's support package.
  
          Returns:
              list of (name, type): A list of the objects found at the extension path.
  
              If unique is True, then the list only contains a single entry and that
              entry will be directly returned.