int getItemViewBaseType(Section section, int localPosition) {
        if (section.hasHeader && section.hasFooter) {
            if (localPosition == 0) {
                return TYPE_HEADER;
            } else if (localPosition == 1) {
                return TYPE_GHOST_HEADER;
            } else if (localPosition == section.length - 1) {
                return TYPE_FOOTER;
            } else {
                return TYPE_ITEM;
            }
        } else if (section.hasHeader) {
            if (localPosition == 0) {
                return TYPE_HEADER;
            } else if (localPosition == 1) {
                return TYPE_GHOST_HEADER;
            } else {
                return TYPE_ITEM;
            }
        } else if (section.hasFooter) {
            if (localPosition == section.length - 1) {
                return TYPE_FOOTER;
            } else {
                return TYPE_ITEM;
            }
        } else {
            // this sections has no header or footer
            return TYPE_ITEM;
        }
    }
@param adapterPosition the adapterPosition of the item in question
@return the custom user type of the item at the adapterPosition
android/modules/module_common/src/main/java/github/tornaco/android/thanos/widget/section/SectioningAdapter.java