@Nullable
  <P extends PsiElement, S extends StubElement<P>> S findChildStubByType(int id, @NotNull IStubElementType<S, P> elementType) {
    int count = getChildrenCount(id);
    int start = getChildrenStart(id);
    switch (getChildrenStorage(start)) {
      case inPlainList: return findChildStubByType(elementType, IntUnaryOperator.identity(), id + 1, id + 1 + count);
      case inJoinedList: return findChildStubByType(elementType, myJoinedChildrenList, start, start + count);
      default: return findChildStubByType(elementType, Objects.requireNonNull(tempMap()).get(id), 0, count);
    }
  }
@Nullable
  <P extends PsiElement, S extends StubElement<P>> S findChildStubByType(int id, @NotNull IStubElementType<S, P> elementType)