private static boolean isResolvedToParameter(PsiElement element) {
    while (element instanceof PyReferenceExpression ref) {
      if (ref.getReference().resolve() instanceof PyNamedParameter)
        return true;
      element = ref.getQualifier();
    }
    return false;
  }
private static boolean isResolvedToParameter(PsiElement element)