static boolean isOpen(KtNamedDeclaration declaration) {
    return
      isInInterface(declaration) ||
      declaration.hasModifier(KtTokens.OPEN_KEYWORD) ||
      declaration.hasModifier(KtTokens.ABSTRACT_KEYWORD) ||
      KtPsiUtilKt.getContainingClassOrObject(declaration) instanceof KtClass ktClass &&
      (ktClass.hasModifier(KtTokens.OPEN_KEYWORD) || ktClass.hasModifier(KtTokens.ABSTRACT_KEYWORD)) &&
      declaration.hasModifier(KtTokens.OVERRIDE_KEYWORD) &&
      !declaration.hasModifier(KtTokens.FINAL_KEYWORD);
  }
static boolean isOpen(KtNamedDeclaration declaration)