private static PsiMethodCallExpression findPutMethodParent(PsiElement element) {
        while (element != null && !(element instanceof PsiMethod)) {
          if (element instanceof PsiExpression expression) {
            PsiMethodCallExpression putCall = extractMapMethodCall(expression, "put");
            if (putCall != null) return putCall;
          }
          element = element.getParent();
        }
        return null;
      }
private static PsiMethodCallExpression findPutMethodParent(PsiElement element)