docs: @SuppressWarnings("unchecked")
      @UiThread
      public void onRestoreInstanceState(@Nullable Bundle savedInstanceState) {
          if (savedInstanceState == null
                  || !savedInstanceState.containsKey(EXPANDED_STATE_MAP)) {
              return;
          }
  
          HashMap<Integer, Boolean> expandedStateMap = (HashMap<Integer, Boolean>) savedInstanceState.getSerializable(EXPANDED_STATE_MAP);
          if (expandedStateMap == null) {
              return;
          }
  
          List<ExpandableWrapper<P, C>> itemList = new ArrayList<>();
          int parentsCount = mParentList.size();
          for (int i = 0; i < parentsCount; i++) {
              ExpandableWrapper<P, C> parentWrapper = new ExpandableWrapper<>(mParentList.get(i));
              itemList.add(parentWrapper);
  
              if (expandedStateMap.containsKey(i)) {
                  boolean expanded = expandedStateMap.get(i);
                  parentWrapper.setExpanded(expanded);
  
                  if (expanded) {
                      List<ExpandableWrapper<P, C>> wrappedChildList = parentWrapper.getWrappedChildList();
                      int childrenCount = wrappedChildList.size();
                      for (int j = 0; j < childrenCount; j++) {
                          ExpandableWrapper<P, C> childWrapper = wrappedChildList.get(j);
                          itemList.add(childWrapper);
                      }
                  }
              }
          }
  
          mFlatItemList = itemList;
  
          notifyDataSetChanged();
      }