docs: public static DiscreteLogLinearFactor createIndicatorFactor(VariableNumMap vars,
        TableFactorBuilder initialWeights) {
      Preconditions.checkArgument(vars.size() == vars.getDiscreteVariables().size());
  
      int featureVarNum = Ints.max(vars.getVariableNumsArray()) + 1;
  
      DiscreteFactor featureValues = createIndicatorFeatureTensor(vars, featureVarNum, initialWeights);
      VariableNumMap featureVarMap = featureValues.getVars().intersection(featureVarNum);
  
      TableFactor initialWeightFactor = (initialWeights != null) ? initialWeights.build() : null;
      return new DiscreteLogLinearFactor(vars, featureVarMap, featureValues, initialWeightFactor);
    }