Remove a extension from the editor.

        :param name_or_klass: The name (or class) of the extension to remove.
        :returns: The removed extension.

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