void (@NotNull final PyCallExpression node) { final PyExpression callee = node.getCallee(); if (callee != null) { final PsiReference calleeReference = callee.getReference(); if ((calleeReference != null) && calleeReference.isReferenceTo(myElementToFind)) { myDependencyFound = true; return; } final String calleeName = callee.getName(); final String name = myElementToFind.getName(); if ((calleeName != null) && calleeName.equals(name)) { // Check by name also myDependencyFound = true; } // Member could be used as method param final PyArgumentList list = node.getArgumentList(); if (list != null) { for (final PyExpression expression : node.getArgumentList().getArgumentExpressions()) { final PsiReference reference = expression.getReference(); if ((reference != null) && reference.isReferenceTo(myElementToFind)) { myDependencyFound = true; } if ((name != null) && name.equals(expression.getName())) { myDependencyFound = true; } } } } }