<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def output(stream):
 """Write the contents of the given stream to stdout."""

    while True:
        content = stream.read(1024)
        if len(content) == 0: break
        sys.stdout.write(content)