<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def remove(self, name_or_klass):
 """ Remove a extension from the editor. :param name_or_klass: The name (or class) of the extension to remove. :returns: The removed extension. """

        logger.debug('removing extension {}'.format(name_or_klass))
        extension = self.get(name_or_klass)
        extension.on_uninstall()
        self._extensions.pop(extension.name)
        return extension