<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def register_extension(self, group, name, extension):
 """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. """


        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))