pub fn build_dag<T, F>(
    expr: Arc<dyn PhysicalExpr>,
    constructor: &F
) -> Result<(NodeIndex, StableGraph<T, usize>)>where
    F: Fn(&ExprTreeNode<NodeIndex>) -> T,