Ref<PyExpression> (@NotNull PyDictLiteralExpression valueExpr, @NotNull Integer index) { boolean allKeysForSure = true; final PyKeyValueExpression[] elements = valueExpr.getElements(); for (PyKeyValueExpression element : elements) { final PyNumericLiteralExpression key = PyUtil.as(element.getKey(), PyNumericLiteralExpression.class); if (key != null && Long.valueOf(index).equals(key.getLongValue())) { return Ref.create(element.getValue()); } else if (!(element.getKey() instanceof PyLiteralExpression)) { allKeysForSure = false; } } return resolveDoubleStar(valueExpr, String.valueOf(index), true, allKeysForSure); }