<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def iter_query(query):
 """Accept a filename, stream, or string. Returns an iterator over lines of the query."""

    try:
        itr = click.open_file(query).readlines()
    except IOError:
        itr = [query]
    return itr