def parse_cigar(cigar):
cigar = cigar.replace('<STR_LIT:M>', '<STR_LIT>').replace('<STR_LIT:I>', '<STR_LIT>').replace('<STR_LIT:D>', '<STR_LIT>').split()<EOL>cigar = [c.replace('<STR_LIT:M>', '<STR_LIT>').replace('<STR_LIT:I>', '<STR_LIT>').replace('<STR_LIT:D>', '<STR_LIT>').split() for c in cigar]<EOL>return [(int(c[<NUM_LIT:0>]), c[<NUM_LIT:1>]) for c in cigar]<EOL>
parse cigar string into list of operations
  e.g.: 28M1I29M2I6M1I46M ->
    [['28', 'M'], ['1', 'I'], ['29', 'M'], ['2', 'I'], ['6', 'M'], ['1', 'I'], ['46', 'M']]