List<PsiNamedElement> () { PyExpression tgt = getForPart().getTarget(); final List<PyExpression> expressions = PyUtil.flattenedParensAndStars(tgt); final List<PsiNamedElement> results = new ArrayList<>(); for (PyExpression expression : expressions) { if (expression instanceof PsiNamedElement) { results.add((PsiNamedElement)expression); } } return results; }