<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def guess_language(file_name, local_file):
 """Guess lexer and language for a file. Returns a tuple of (language_str, lexer_obj). """


    lexer = None

    language = get_language_from_extension(file_name)
    if language:
        lexer = get_lexer(language)
    else:
        lexer = smart_guess_lexer(file_name, local_file)
        if lexer:
            language = u(lexer.name)

    return language, lexer