def normalize_result(result, default, threshold=<NUM_LIT>):
if result is None:<EOL><INDENT>return default<EOL><DEDENT>if result.get('<STR_LIT>') is None:<EOL><INDENT>return default<EOL><DEDENT>if result.get('<STR_LIT>') < threshold:<EOL><INDENT>return default<EOL><DEDENT>return normalize_encoding(result.get('<STR_LIT>'),<EOL>default=default)<EOL>
Interpret a chardet result.