PsiReferenceExpression (PsiExpression keySetCandidate) { if (!(keySetCandidate instanceof PsiMethodCallExpression methodCallExpression)) return null; if (!MAP_KEY_SET.test(methodCallExpression)) return null; PsiExpression qualifier = methodCallExpression.getMethodExpression().getQualifierExpression(); return tryCast(PsiUtil.skipParenthesizedExprDown(qualifier), PsiReferenceExpression.class); }