def extract_chain(server_handshake_bytes):

    output = []

    chain_bytes = None

    for record_type, _, record_data in _parse_tls_records(server_handshake_bytes):
        if record_type != b'\x16':
            continue
        for message_type, message_data in _parse_handshake_messages(record_data):
            if message_type == b'\x0b':
                chain_bytes = message_data
                break
        if chain_bytes:
            break

    if chain_bytes:
        # The first 3 bytes are the cert chain length
        pointer = 3
        while pointer < len(chain_bytes):
            cert_length = int_from_bytes(chain_bytes[pointer:pointer + 3])
            cert_start = pointer + 3
            cert_end = cert_start + cert_length
            pointer = cert_end
            cert_bytes = chain_bytes[cert_start:cert_end]
            output.append(Certificate.load(cert_bytes))

    return output
Counts the number of occurences of the words in forms_list in the text
dataset/ETHPy150Open wbond/oscrypto/oscrypto/_tls.py/extract_chain--crossover with--dataset/ETHPy150Open bigmlcom/python/bigml/predicate.py/term_matches_tokens