PsiElement (@NotNull PyExpression expression) { assert myPosition >= 0; final PyExpression containedExpression = PyPsiUtils.flattenParens(expression); if (containedExpression instanceof PyTupleExpression) { final PyExpression[] elements = ((PyTupleExpression)containedExpression).getElements(); return myPosition < elements.length ? elements[myPosition] : null; } else if (containedExpression instanceof PyBinaryExpression && ((PyBinaryExpression)containedExpression).isOperator("+")) { return resolveNotNestedBinaryExpression((PyBinaryExpression)containedExpression); } else if (containedExpression instanceof PyCallExpression) { final PyExpression callee = ((PyCallExpression)containedExpression).getCallee(); if (callee != null && "dict".equals(callee.getName()) && myPosition != 0) { return null; } } else if (myPosition != 0 && PsiTreeUtil.instanceOf(containedExpression, PyLiteralExpression.class, PySetLiteralExpression.class, PyListLiteralExpression.class, PyDictLiteralExpression.class)) { return null; } return containedExpression; }