Get a extension by name (or class).

        :param name_or_klass: The name or the class of the extension to get
        :type name_or_klass: str or type
        :rtype: spyder.api.mode.EditorExtension

def get(self, name_or_klass):
        """
        Get a extension by name (or class).

        :param name_or_klass: The name or the class of the extension to get
        :type name_or_klass: str or type
        :rtype: spyder.api.mode.EditorExtension
        """
        if not isinstance(name_or_klass, str):
            name_or_klass = name_or_klass.__name__
        return self._extensions[name_or_klass]