docs: def add_extension(self, klass, extension):
          """Register an extension for a class.
  
          :param klass: Class to register an extension for
          :param extension: Extension (arbitrary type)
          """
          klass = self._get_class_path(klass)
  
          # TODO: Take order into account.
          self._extensions.setdefault(klass, []).append(extension)