def parse_handshake_messages(data):
pointer = <NUM_LIT:0><EOL>data_len = len(data)<EOL>while pointer < data_len:<EOL><INDENT>length = int_from_bytes(data[pointer + <NUM_LIT:1>:pointer + <NUM_LIT:4>])<EOL>yield (<EOL>data[pointer:pointer + <NUM_LIT:1>],<EOL>data[pointer + <NUM_LIT:4>:pointer + <NUM_LIT:4> + length]<EOL>)<EOL>pointer += <NUM_LIT:4> + length<EOL><DEDENT>
Creates a generator returning tuples of information about each message in
a byte string of data from a TLS handshake record

:param data:
    A byte string of a TLS handshake record data

:return:
    A generator that yields 2-element tuples:
    [0] Byte string of message type
    [1] Byte string of message data