private static Placement wrapQuadPattern(ExprList exprsIn, Node graphNode, BasicPattern pattern) {
Set<Var> vs = DS.set();
VarUtils.addVars(vs, pattern);
if (Var.isVar(graphNode))
vs.add(Var.alloc(graphNode));
ExprList pushed = new ExprList();
ExprList unpushed = new ExprList();
for (Expr e : exprsIn) {
Set<Var> eVars = e.getVarsMentioned();
if (vs.containsAll(eVars)) {
pushed.add(e);
} else {
unpushed.add(e);
}
}
// Can't push anything into a filter around this quadpattern
if (pushed.size() == 0) return null;