def generate_and_write_search_code_from_expression