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

def new_encoded_stream(args, stream):
    '''Return a stream writer.'''
    if args.ascii_print:
        return wpull.util.ASCIIStreamWriter(stream)
    else:
        return stream