<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_chain(cur):
 """Iterate over all of the chains in the database. Args: cur (:class:`sqlite3.Cursor`):
 An sqlite3 cursor. This function is meant to be run within a :obj:`with` statement. Yields: list: The chain. """

    select = "SELECT nodes FROM chain"
    for nodes, in cur.execute(select):
        yield json.loads(nodes)