class MultiLanguageModel implements LanguageModel {

  private final List<LanguageModel> lms;

  public MultiLanguageModel(List<LanguageModel> lms) {
    if (lms.isEmpty()) {
      throw new IllegalArgumentException("List of language models is empty");
    }
    this.lms = lms;
  }

  @Override
  public Probability getPseudoProbability(List<String> context) {<FILL_FUNCTION_BODY>}

  @Override
  public void close() {
    lms.stream().forEach(LanguageModel::close);
  }

  @Override
  public String toString() {
    return lms.toString();
  }
}

    double prob = 0;
    float coverage = 0;
    long occurrences = 0;
    for (LanguageModel lm : lms) {
      Probability pProb = lm.getPseudoProbability(context);
      //System.out.println(i + ". " + pProb.getProb() + " (" + pProb.getCoverage() + ")");
      // TODO: decide what's the proper way to combine the probabilities
      prob += pProb.getProb();
      coverage += pProb.getCoverage();
      occurrences += pProb.getOccurrences();
    }
    return new Probability(prob, coverage/lms.size(), occurrences);
  
<no_super_class>