<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def compare_seqs_leven(seqs):
 """ calculate Levenshtein ratio of sequences """

    A, B, ignore_gaps = seqs
    a, b = remove_gaps(A[1], B[1]) # actual sequences
    if len(a) != len(b):
        print('# reads are not the same length', file=sys.stderr)
        exit()
    pident = lr(a, b) * 100
    return A[0], B[0], pident