def select_one_carry(new_c: TfVal, c: TfVal) -> TfVal:
    pred_b_bcast = _broadcast_in_dim(pred_b, shape=new_c.shape, broadcast_dimensions=list(range(len(pred_b.shape))))
    return tf.where(pred_b_bcast, new_c, c)
def select_one_carry(new_c: TfVal, c: TfVal) -> TfVal:
    pred_b_bcast = _broadcast_in_dim(pred_b, shape=new_c.shape, broadcast_dimensions=list(range(len(pred_b.shape))))
    return tf.where(pred_b_bcast, new_c, c)