code: public StaticFactor addStaticFactor(int[] neighborIndices, int[] neighborDimensions, Function<int[], Double> assignmentFeaturizer) {
      NDArrayDoubles doubleArray = new NDArrayDoubles(neighborDimensions);
      for (int[] assignment : doubleArray) {
        doubleArray.setAssignmentValue(assignment, assignmentFeaturizer.apply(assignment));
      }
      return addStaticFactor(doubleArray, neighborIndices);
    }
docs: This adds a static factor to the model, which will always produce the same value regardless of the assignment of
  weights during inference.
  
  @param neighborIndices the names of the variables, as indices
  @param assignmentFeaturizer a function that maps from an assignment to the variables, represented as an array of
  assignments in the same order as presented in neighborIndices, to a constant value.
  @return a reference to the created factor. This can be safely ignored, as the factor is already saved in the model