**Use case**
Some program left garbage in terminal.

**Describe the solution you'd like**
Subset of what `reset` command does.
// reproduce the error.
                prin
                return false;
            }
            // Check that after the query is formatted, we can parse it back,
            // format again and get the same result. Unfortunately, we can't
            // compare the ASTs, which would be more sensitive to errors. This
            // double formatting check doesn't catch all errors, e.g. we can
            // format query incorrectly, but to a valid SQL that we can then
            // parse and format into the same SQL.
            ases where we can generate the SQL
            // which we can't parse:
            // * fi replaced by fuzzer with
            //   something else, leading to constructs such as
            //   arrayMap((min(x) + 3) -> x + 1, ....)
            , leading to:
            ), 3)).
             when we can parse the query, but
            // it's logically incorrect and its formatting is a mess, such as
            // when `lambda()` function gets substituted into a wrong place.
            // To avoid dealing with these cases, run the check only for the
            // queries we were able to successfully execute.
            // The final caveat is that sometimes WITH queries are not executed,
            // if they are not referenced by the main SELECT, so they can still
            // have the aforementioned problems. Disable this check for such
            // queries, for lack of a better solution.
            Clause(parsed_query.get()))
            
                ASTPtr parsed_formatted_query;
                try