def read_message_type(file):
message_byte = file.read(<NUM_LIT:1>)<EOL>if message_byte == b'<STR_LIT>':<EOL><INDENT>return ConnectionClosed<EOL><DEDENT>message_number = message_byte[<NUM_LIT:0>]<EOL>return _message_types.get(message_number, UnknownMessage)<EOL>
Read the message type from a file.