code: public static <I, D> List<Word<I>> suffixesForLocalOutput(Query<I, D> ceQuery,
                                                                int localSuffixIdx,
                                                                boolean allSuffixes) {
  
          if (localSuffixIdx == -1) {
              return Collections.emptyList();
          }
  
          Word<I> suffix = ceQuery.getInput().subWord(localSuffixIdx);
  
          if (!allSuffixes) {
              return Collections.singletonList(suffix);
          }
  
          return suffix.suffixes(false);
      }
docs: Transforms a suffix index returned by a {@link LocalSuffixFinder} into a list of distinguishing suffixes. This
  list always contains the corresponding local suffix. 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.