code: public static <I, D> GlobalSuffixFinder<I, D> fromLocalFinder(final LocalSuffixFinder<I, D> localFinder,
                                                                    final boolean allSuffixes) {
  
          return new GlobalSuffixFinder<I, D>() {
  
              @Override
              public <RI extends I, RD extends D> List<Word<RI>> findSuffixes(Query<RI, RD> ceQuery,
                                                                                        AccessSequenceTransformer<RI> asTransformer,
                                                                                        SuffixOutput<RI, RD> hypOutput,
                                                                                        MembershipOracle<RI, RD> oracle) {
                  int idx = localFinder.findSuffixIndex(ceQuery, asTransformer, hypOutput, oracle);
                  return suffixesForLocalOutput(ceQuery, idx, allSuffixes);
              }
  
              @Override
              public String toString() {
                  return localFinder.toString() + (allSuffixes ? "-AllSuffixes" : "");
              }
          };
      }
docs: Transforms a {@link LocalSuffixFinder} into a global one. Since local suffix finders only return a single suffix,
  suffix-closedness of the set of distinguishing suffixes might not be preserved. Note that for correctly
  implemented local suffix finders, this does not impair correctness of the learning algorithm. However, without
  suffix closedness, intermediate hypothesis models might be non-canonical, if no additional precautions are taken.
  For that reasons, the {@code allSuffixes} parameter can be specified to control whether or not the list returned
  by {@link GlobalSuffixFinder#findSuffixes(Query, AccessSequenceTransformer, SuffixOutput, MembershipOracle)} of
  the returned global suffix finder should not only contain the single suffix, but also all of its suffixes,
  ensuring suffix-closedness.
  
  @param localFinder
  the local suffix finder
  @param allSuffixes
  whether or not all suffixes of the found local suffix should be added
  
  @return a global suffix finder using the analysis method from the specified local suffix finder