docs: @NonNull
      @UiThread
      private HashMap<Integer, Boolean> generateExpandedStateMap() {
          HashMap<Integer, Boolean> parentHashMap = new HashMap<>();
          int childCount = 0;
  
          int listItemCount = mFlatItemList.size();
          for (int i = 0; i < listItemCount; i++) {
              if (mFlatItemList.get(i) != null) {
                  ExpandableWrapper<P, C> listItem = mFlatItemList.get(i);
                  if (listItem.isParent()) {
                      parentHashMap.put(i - childCount, listItem.isExpanded());
                  } else {
                      childCount++;
                  }
              }
          }
  
          return parentHashMap;
      }