private static PsiLocalVariable tryResolveLocalVariable(PsiElement element) {
    if (element instanceof PsiReferenceExpression referenceExpression) {
      if (referenceExpression.getQualifierExpression() == null) {
        return ObjectUtils.tryCast(referenceExpression.resolve(), PsiLocalVariable.class);
      }
    }
    return null;
  }
private static PsiLocalVariable tryResolveLocalVariable(PsiElement element)