String (@NotNull PyCallExpression callExpression, int index, @NotNull String keyword) { // SUPPORTED CASES: // name = "Point" // Point = namedtuple(name, ...) // Point = namedtuple("Point", ...) // Point = namedtuple(("Point"), ...) // Point = namedtuple(typename="Point", ...) final PyExpression expression = PyPsiUtils.flattenParens(callExpression.getArgument(index, keyword, PyExpression.class)); if (expression instanceof PyReferenceExpression) { return PyPsiUtils.strValue(fullResolveLocally((PyReferenceExpression)expression)); } return PyPsiUtils.strValue(expression); }