PsiNamedElement (@NotNull final String the_name) { // performance: check simple case first PyExpression[] targets = getTargets(); if (targets.length == 1 && targets[0] instanceof PyTargetExpression target) { return !target.isQualified() && the_name.equals(target.getName()) ? target : null; } return PyUtil.IterHelper.findName(getNamedElements(), the_name); }