def _iter_decode_generator(input, decoder):
decode = decoder.decode<EOL>input = iter(input)<EOL>for chunck in input:<EOL><INDENT>output = decode(chunck)<EOL>if output:<EOL><INDENT>assert decoder.encoding is not None<EOL>yield decoder.encoding<EOL>yield output<EOL>break<EOL><DEDENT><DEDENT>else:<EOL><INDENT>output = decode(b'<STR_LIT>', final=True)<EOL>assert decoder.encoding is not None<EOL>yield decoder.encoding<EOL>if output:<EOL><INDENT>yield output<EOL><DEDENT>return<EOL><DEDENT>for chunck in input:<EOL><INDENT>output = decode(chunck)<EOL>if output:<EOL><INDENT>yield output<EOL><DEDENT><DEDENT>output = decode(b'<STR_LIT>', final=True)<EOL>if output:<EOL><INDENT>yield output<EOL><DEDENT>
Return a generator that first yields the :obj:`Encoding`,
    then yields output chukns as Unicode strings.