def search(query, data, replacements=None):
query = q.Query(query, params=replacements)<EOL>for entry in data:<EOL><INDENT>if solve.solve(query, entry).value:<EOL><INDENT>yield entry<EOL><DEDENT><DEDENT>
Yield objects from 'data' that match the 'query'.