code: @UiThread
      int getChildPosition(int flatPosition) {
          if (flatPosition == 0) {
              return 0;
          }
  
          int childCount = 0;
          for (int i = 0; i < flatPosition; i++) {
              ExpandableWrapper<P, C> listItem = mFlatItemList.get(i);
              if (listItem.isParent()) {
                  childCount = 0;
              } else {
                  childCount++;
              }
          }
          return childCount;
      }
docs: Given the index relative to the entire RecyclerView for a child item,
  returns the child position within the child list of the parent.