public int getSectionForAdapterPosition(int adapterPosition) {
        if (sections == null) {
            buildSectionIndex();
        }

        if (getItemCount() == 0) {
            return -1;
        }

        if (adapterPosition < 0 || adapterPosition >= getItemCount()) {
            throw new IndexOutOfBoundsException("adapterPosition " + adapterPosition + " is not in range of items represented by adapter");
        }

        return sectionIndicesByAdapterPosition[adapterPosition];
    }
Given a "global" adapter adapterPosition, determine which sections contains that item

@param adapterPosition an adapter adapterPosition from 0 to getItemCount()-1
@return the index of the sections containing that item
android/modules/module_common/src/main/java/github/tornaco/android/thanos/widget/section/SectioningAdapter.java