code: public Optional<ImmutableSubstitution<ImmutableTerm>> computeMGUS(ImmutableSubstitution<? extends ImmutableTerm> substitution1,
                                                                               ImmutableSubstitution<? extends ImmutableTerm> substitution2) {
  
          ImmutableList.Builder<ImmutableTerm> firstArgListBuilder = ImmutableList.builder();
          ImmutableList.Builder<ImmutableTerm> secondArgListBuilder = ImmutableList.builder();
  
          for (Map.Entry<Variable, ? extends ImmutableTerm> entry : substitution1.getImmutableMap().entrySet()) {
              firstArgListBuilder.add(entry.getKey());
              secondArgListBuilder.add(entry.getValue());
          }
  
          for (Map.Entry<Variable, ? extends ImmutableTerm> entry : substitution2.getImmutableMap().entrySet()) {
              firstArgListBuilder.add(entry.getKey());
              secondArgListBuilder.add(entry.getValue());
          }
  
          ImmutableList<ImmutableTerm> firstArgList = firstArgListBuilder.build();
          ImmutableList<ImmutableTerm> secondArgList = secondArgListBuilder.build();
  
          return computeMGU(firstArgList, secondArgList);
      }
docs: Computes one Most General Unifier (MGU) of (two) substitutions.