def receive_message(self):
with self.lock:<EOL><INDENT>assert self.can_receive_messages()<EOL>message_type = self._read_message_type(self._file)<EOL>message = message_type(self._file, self)<EOL>self._message_received(message)<EOL><DEDENT>
Receive a message from the file.