List<String> (PyExpression[] elements) { List<String> results = new ArrayList<>(); for (PyExpression element : elements) { if (element instanceof PyStringLiteralExpression) { results.add(((PyStringLiteralExpression)element).getStringValue()); } } return results; }