docs: @UiThread
      int getNearestParentPosition(int flatPosition) {
          if (flatPosition == 0) {
              return 0;
          }
  
          int parentCount = -1;
          for (int i = 0; i <= flatPosition; i++) {
              ExpandableWrapper<P, C> listItem = mFlatItemList.get(i);
              if (listItem.isParent()) {
                  parentCount++;
              }
          }
          return parentCount;
      }