'Return extension aliases supported by a given plugin'

def get_plugin_supported_extension_aliases(self, plugin):

    aliases = set()
    for item in ([plugin] + plugin.__class__.mro()):
        try:
            aliases |= set(getattr(item, 'supported_extension_aliases', []))
        except TypeError:
            pass
    return aliases
