List<String> (@Nullable PyExpression expression) { final PsiElement elementToAnalyze = resolveValue(expression); if (elementToAnalyze instanceof PyStringLiteralExpression) { return Collections.singletonList(((PyStringLiteralExpression)elementToAnalyze).getStringValue()); } else if (elementToAnalyze instanceof PyListLiteralExpression || elementToAnalyze instanceof PyTupleExpression) { return StreamEx .of(((PySequenceExpression)elementToAnalyze).getElements()) .map(PyPackageUtil::resolveValue) .select(PyStringLiteralExpression.class) .map(PyStringLiteralExpression::getStringValue) .toList(); } return null; }