def _parse_cigar(self, cigar):
ces = [m.groupdict() for m in cigar_re.finditer(cigar)]<EOL>ref_pos = [None] * len(ces)<EOL>tgt_pos = [None] * len(ces)<EOL>cigar_op = [None] * len(ces)<EOL>ref_cur = tgt_cur = <NUM_LIT:0><EOL>for i, ce in enumerate(ces):<EOL><INDENT>ref_pos[i] = ref_cur<EOL>tgt_pos[i] = tgt_cur<EOL>cigar_op[i] = ce["<STR_LIT>"]<EOL>step = int(ce["<STR_LIT>"])<EOL>if ce["<STR_LIT>"] in "<STR_LIT>":<EOL><INDENT>ref_cur += step<EOL><DEDENT>if ce["<STR_LIT>"] in "<STR_LIT>":<EOL><INDENT>tgt_cur += step<EOL><DEDENT><DEDENT>ref_pos.append(ref_cur)<EOL>tgt_pos.append(tgt_cur)<EOL>return ref_pos, tgt_pos, cigar_op<EOL>
For a given CIGAR string, return the start positions of
        each aligned segment in ref and tgt, and a list of CIGAR operators.