code: public VarConfig getIntersection(Iterable<Var> otherVars) {
          VarConfig subset = new VarConfig();
          for (Var v : otherVars) {
              Integer state = config.get(v);
              if (state != null) {
                  subset.put(v, state);
              }
          }
          return subset;
      }
docs: Gets a new variable configuration that keeps only variables in otherVars.