<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def message_convert_rx(message_rx):
 """convert the message from the CANAL type to pythoncan type"""

    is_extended_id = bool(message_rx.flags & IS_ID_TYPE)
    is_remote_frame = bool(message_rx.flags & IS_REMOTE_FRAME)
    is_error_frame = bool(message_rx.flags & IS_ERROR_FRAME)

    return Message(timestamp=message_rx.timestamp,
                   is_remote_frame=is_remote_frame,
                   is_extended_id=is_extended_id,
                   is_error_frame=is_error_frame,
                   arbitration_id=message_rx.id,
                   dlc=message_rx.sizeData,
                   data=message_rx.data[:message_rx.sizeData])