public static boolean isInterfaceEnumClassOrRecord(@Nullable ASTNode element,
                                                     @NotNull IElementType elementType) {
    if (!is(element, CLASS_SET)) {
      return false;
    }
    if (element == null) {
      return false;
    }
    ASTNode firstChild = element.getFirstChildNode();
    if (firstChild == null) {
      return false;
    }
    for (ASTNode child = firstChild; child != null; child = child.getTreeNext()) {
      if (is(child, elementType)) return true;
    }
    return false;
  }
public static boolean isInterfaceEnumClassOrRecord(@Nullable ASTNode element,
                                                     @NotNull IElementType elementType)