<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def warehouse_query(line, cell):
    "my cell magic"
    from IPython import get_ipython

    parts = line.split()
    w_var_name = parts.pop(0)
    w = get_ipython().ev(w_var_name)

    w.query(cell).close()