treeview.set_search_equal_func(self.search_function)
self.treeview = treeview

def search_function(self, model, column, key, rowiter):
    row = model[rowiter]
if key.lower() in list(row)[column - 1].lower():
    return False
for inner in row.iterchildren():
    if key.lower() in list(inner)[column - 1].lower():
        self.treeview.expand_to_path(row.path)
break
user search collapsed rows in a Gtk.TreeView