Ref<PyExpression> (@NotNull PyDictLiteralExpression expression, @NotNull String mappingKey) { boolean allKeysForSure = true; final PyKeyValueExpression[] keyValueExpressions = expression.getElements(); for (PyKeyValueExpression keyValueExpression : keyValueExpressions) { PyExpression keyExpression = keyValueExpression.getKey(); if (keyExpression instanceof PyStringLiteralExpression key) { if (key.getStringValue().equals(mappingKey)) { return Ref.create(keyValueExpression.getValue()); } } else if (!(keyExpression instanceof PyLiteralExpression)) { allKeysForSure = false; } } return resolveDoubleStar(expression, mappingKey, false, allKeysForSure); }