def remap_pos(node, cst_node, line):
    """
    remap the pos of a command substitution node `cst_node` to its parent node
    `node`
    """
    cst_str = line[slice(*cst_node.pos)]
    remapped_start = node.word.find(cst_str)
    remapped_end = remapped_start + len(cst_str)
    return remapped_start, remapped_end
