def trace_realign_region(row, read_cigar, read_start):
    """
    The function is used to trace the rdp and ci at the border of realign region and return a dict
    """
    realn_start_t = read_cigar.trace_ci_rdp(start_ci=(0, 0), start_pos=
        read_start, end_pos=row['realign_start'], start_rdp=0)
    if not realn_start_t[2]:
        raise Exception('Error: cannot trace to the realign border', row)
    realn_end_t = read_cigar.trace_ci_rdp(start_ci=realn_start_t[0],
        start_pos=row['realign_start'], end_pos=row['realign_end'],
        start_rdp=realn_start_t[1])
    if not realn_end_t[2]:
        raise Exception('Error: cannot trace to the realign border', row)
    return {'realign_start_ci': realn_start_t[0], 'realign_end_ci':
        realn_end_t[0], 'realign_start_rdp': realn_start_t[1],
        'realign_end_rdp': realn_end_t[1]}
