void (@NotNull final ReferencesSearch.SearchParameters queryParameters, @NotNull final Processor<? super PsiReference> consumer) { final PsiElement element = queryParameters.getElementToSearch(); if (!(element instanceof PyNamedParameter)) { return; } final ScopeOwner owner = ReadAction.compute(() -> ScopeUtil.getScopeOwner(element)); if (!(owner instanceof PyFunction)) { return; } ReferencesSearch.search(owner, queryParameters.getScopeDeterminedByUser()).forEach(reference -> { final PsiElement refElement = reference.getElement(); final PyCallExpression call = PsiTreeUtil.getParentOfType(refElement, PyCallExpression.class); if (call != null && PsiTreeUtil.isAncestor(call.getCallee(), refElement, false)) { final PyArgumentList argumentList = call.getArgumentList(); if (argumentList != null) { final PyKeywordArgument keywordArgument = argumentList.getKeywordArgument(((PyNamedParameter)element).getName()); if (keywordArgument != null) { return consumer.process(keywordArgument.getReference()); } } } return true; }); }