Describe how you would implement n-gram searching with wildcard indexing.
Implement search_with_wildcard_index(documents, query, n). documents is a list of strings, query is a case-insensitive substring pattern, and ? matches exactly one character. Return the sorted zero-based indices of documents containing the pattern. The index should use fixed-length n-grams and wildcard variants, then verify candidates to avoid false positives.
?.def search_with_wildcard_index(documents, query, n):