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

def connect(nodes):
    '''
    Connect a list of nodes.

    Connected nodes have an ``output`` member which is the following node in
    the line. The last node's ``output`` is a :class:`Queue` for
    easy plumbing.
    '''
    for a, b in zip(nodes[:-1], nodes[1:]):
        a.output = b
    b.output = queues.Queue()