def sig_blob_matches(sig_blobs, public_pair_blobs, tmp_script, signature_for_hash_type_f,
                     flags, exit_early=False):

    strict_encoding = not not (flags & VERIFY_STRICTENC)

    # Drop the signatures, since there's no way for a signature to sign itself
    for sig_blob in sig_blobs:
        tmp_script = delete_subscript(tmp_script, bin_script([sig_blob]))

    sig_cache = {}
    sig_blob_indices = []
    ppb_idx = -1

    while sig_blobs and len(sig_blobs) <= len(public_pair_blobs):
        if exit_early and -1 in sig_blob_indices:
            break
        sig_blob, sig_blobs = sig_blobs[0], sig_blobs[1:]
        try:
            sig_pair, signature_type = parse_signature_blob(sig_blob, flags)
        except (der.UnexpectedDER, ValueError):
            sig_blob_indices.append(-1)
            continue

        if signature_type not in sig_cache:
            sig_cache[signature_type] = signature_for_hash_type_f(signature_type, script=tmp_script)

        try:
            ppp = ecdsa.possible_public_pairs_for_signature(
                ecdsa.generator_secp256k1, sig_cache[signature_type], sig_pair)
        except ecdsa.NoSuchPointError:
            ppp = []

        while len(sig_blobs) < len(public_pair_blobs):
            public_pair_blob, public_pair_blobs = public_pair_blobs[0], public_pair_blobs[1:]
            ppb_idx += 1
            if strict_encoding:
                check_public_key_encoding(public_pair_blob)
            try:
                public_pair = sec_to_public_pair(public_pair_blob, strict=strict_encoding)
            except EncodingError:
                public_pair = None
            if public_pair in ppp:
                sig_blob_indices.append(ppb_idx)
                break
        else:
            sig_blob_indices.append(-1)
    return sig_blob_indices
sig_blobs: signature blobs
dataset/ETHPy150Open richardkiss/pycoin/pycoin/tx/script/check_signature.py/sig_blob_matches