class StreamCatalogService {

    String convertNested(List<String> streams, String expr) {
        if (StringUtils.isEmpty(expr)) {
            return expr;
        }
        StringBuilder sb = new StringBuilder();
        Pattern pattern = Pattern.compile("(\\w+)?\\.(\\w+)");
        Matcher matcher = pattern.matcher(expr);
        int startFrom = 0;
        int end = 0;
        while (matcher.find(startFrom)) {
            String prefix = matcher.group(1);
            String suffix = matcher.group(2);
            if (end < matcher.start()) {
                sb.append(expr.substring(end, matcher.start()));
            }
            if (streams.contains(prefix)) {
                sb.append(matcher.group());
            } else {
                if (startFrom == 0) {
                    sb.append(prefix);
                }
                sb.append("['").append(suffix).append("']");
            }
            startFrom = matcher.start(2);
            end = matcher.end();
        }
        sb.append(expr.substring(end));
        return sb.toString();
    }

    public  StreamCatalogService(StorageManager dao, FileStorage fileStorage, MLModelRegistryClient modelRegistryClient);

}