'Get the service code for a :class:`~subliminal.language.Language`
It uses the :data:`language_map` and if there\'s no match, falls back
on the :data:`language_code` attribute of the given :class:`~subliminal.language.Language`'

def get_code(self, language):

    if (language in self.language_map):
        return self.language_map[language]
    if (self.language_code is None):
        raise ValueError(('%r    has    no    matching    code' % language))
    return getattr(language, self.language_code)
