You have a table, need to search across rows, and sort by column, among other things.
Implement the function below for an in-memory list of row dictionaries. Return rows where the case-insensitive search text appears in any value, preserving each row unchanged, then sort matching rows by the requested column in ascending order. Assume every row contains the sort column and its values are mutually comparable.
rows is a list of dictionaries, query is a string, and sort_column is a string. Return a new list of matching dictionaries. Sorting must be stable when values are equal.
def search_and_sort(rows, query, sort_column):