docs: private boolean isValidTreeType(Tree t) {
      if (t instanceof LambdaExpressionTree) {
        return true;
      }
      if (t instanceof ClassTree) {
        NestingKind nestingKind = ASTHelpers.getSymbol((ClassTree) t).getNestingKind();
        return nestingKind.equals(NestingKind.ANONYMOUS) || nestingKind.equals(NestingKind.LOCAL);
      }
      return false;
    }