static boolean isReasonableChain(LookupElement base, LookupElement item) {
    PsiElement baseElement = base.getPsiElement();
    PsiElement itemElement = item.getPsiElement();
    if (baseElement == null || itemElement == null) return true;
    if (baseElement.equals(itemElement)) return false;
    if (itemElement instanceof PsiMember member) {
      PsiClass itemClass = member.getContainingClass();
      if (itemClass == null || itemClass.equals(baseElement)) return true;
      if (PsiTreeUtil.isAncestor(itemClass, baseElement, true)) return false;
    }
    return true;
  }
static boolean isReasonableChain(LookupElement base, LookupElement item)