the iterator returned from serializing a stream (basically
any iterator that yields unicode objects)

param method:

the serialization method; determines how characters not
representable in the specified encoding are treated

param encoding:

how the output string should be encoded; if set to None,
this method returns a unicode object

param out:

a file-like object that the output should be written to
instead of being returned as one big string; note that if
this is a file or socket (or similar), the encoding must
not be None (that is, the output must be encoded)

return:

a str or unicode object (depending on the encoding
parameter), or None if the out parameter is provided