code: def register_extension(self, group, name, extension):
          
  
          if isinstance(extension, str):
              name, extension = self.load_extension(extension)[0]
  
          if group not in self._registered_extensions:
              self._registered_extensions[group] = []
  
          self._registered_extensions[group].append((name, extension))
docs: Register an extension.
  
          Args:
              group (str): The type of the extension
              name (str): A name for the extension
              extension (str or class): If this is a string, then it will be
                  interpreted as a path to import and load.  Otherwise it
                  will be treated as the extension object itself.