code: function assignGroupMarginsAndHeaders(offset) {
                          if (options.last) {
                              // When looking for the *last* group, the *trailing* header and margin belong to the group.
                              return offset - that._getHeaderSizeGroupAdjustment() - that._sizes.itemsContainerOuterStart;
                          } else {
                              // When looking for the *first* group, the *leading* header and margin belong to the group.
                              // No need to make any adjustments to offset because the correct header and margin
                              // already belong to the group.
                              return offset;
                          }
                      }
docs: Assign the headers and margins to the appropriate groups.