String (@NotNull PySubscriptionExpression subscription) { return Optional .ofNullable(subscription.getIndexExpression()) .map(indexExpression -> PyUtil.as(indexExpression, PyStringLiteralExpression.class)) .map(PyStringLiteralExpression::getStringValue) .filter(PyNames::isIdentifier) .orElse(null); }