code: def _iter_decode_generator(input, decoder):
      
      decode = decoder.decode
      input = iter(input)
      for chunck in input:
          output = decode(chunck)
          if output:
              assert decoder.encoding is not None
              yield decoder.encoding
              yield output
              break
      else:
          # Input exhausted without determining the encoding
          output = decode(b'', final=True)
          assert decoder.encoding is not None
          yield decoder.encoding
          if output:
              yield output
          return
  
      for chunck in input:
          output = decode(chunck)
          if output:
              yield output
      output = decode(b'', final=True)
      if output:
          yield output
docs: Return a generator that first yields the :obj:`Encoding`,
      then yields output chukns as Unicode strings.