def parse_tls_records(data):
pointer = <NUM_LIT:0><EOL>data_len = len(data)<EOL>while pointer < data_len:<EOL><INDENT>if data[pointer:pointer + <NUM_LIT:1>] == b'<STR_LIT>':<EOL><INDENT>break<EOL><DEDENT>length = int_from_bytes(data[pointer + <NUM_LIT:3>:pointer + <NUM_LIT:5>])<EOL>yield (<EOL>data[pointer:pointer + <NUM_LIT:1>],<EOL>data[pointer + <NUM_LIT:1>:pointer + <NUM_LIT:3>],<EOL>data[pointer + <NUM_LIT:5>:pointer + <NUM_LIT:5> + length]<EOL>)<EOL>pointer += <NUM_LIT:5> + length<EOL><DEDENT>
Creates a generator returning tuples of information about each record
in a byte string of data from a TLS client or server. Stops as soon as it
find a ChangeCipherSpec message since all data from then on is encrypted.

:param data:
    A byte string of TLS records

:return:
    A generator that yields 3-element tuples:
    [0] Byte string of record type
    [1] Byte string of protocol version
    [2] Byte string of record data