def _lang(codelet):

    try:
        if codelet.filename:
            lex = pgl.guess_lexer_for_filename(codelet.filename, codelet.code)
        else:
            lex = pgl.guess_lexer(codelet.code)
        return LANGS_ALL[lex.name]
    except (util.ClassNotFound, KeyError):
        raise UnsupportedFileError(codelet.filename)
Private function to identify the language of a codelet.
dataset/ETHPy150Open earwig/bitshift/bitshift/parser/__init__.py/_lang