code: public Pair<String, VarTensor> decode(FgModel model, LogLinearExample llex) {
          LFgExample ex = getFgExample(llex);
          
          MbrDecoderPrm prm = new MbrDecoderPrm();
          prm.infFactory = getBpPrm(); 
          MbrDecoder decoder = new MbrDecoder(prm);
          decoder.decode(model, ex);
          List<VarTensor> marginals = decoder.getVarMarginals();
          VarConfig vc = decoder.getMbrVarConfig();
          String stateName = vc.getStateName(ex.getFactorGraph().getVar(0));
          if (marginals.size() != 1) {
              throw new IllegalStateException("Example is not from a LogLinearData factory");
          }
          return new Pair<String,VarTensor>(stateName, marginals.get(0));
      }
docs: Decodes a single example.
  
  @param model The log-linear model.
  @param ex The example to decode.
  @return A pair containing the most likely label (i.e. value of y) and the
  distribution over y values.