code: public Set<OrganizationSet> createCompactionSets(Table tableInfo, Collection<ShardIndexInfo> shards)
      {
          Collection<Collection<ShardIndexInfo>> shardsByDaysBuckets = getShardsByDaysBuckets(tableInfo, shards, temporalFunction);
  
          ImmutableSet.Builder<OrganizationSet> compactionSets = ImmutableSet.builder();
          for (Collection<ShardIndexInfo> shardInfos : shardsByDaysBuckets) {
              compactionSets.addAll(buildCompactionSets(tableInfo, ImmutableSet.copyOf(shardInfos)));
          }
          return compactionSets.build();
      }
docs: All shards provided to this method will be considered for creating a compaction set.