docs: def write_idat(self, outfile, idat_sequence):
          """
          Write png with IDAT to file
  
          `idat_sequence` should be iterable that produce IDAT chunks
          compatible with `Writer` configuration.
          """
          # http://www.w3.org/TR/PNG/#5PNG-file-signature
          outfile.write(png_signature)
          color_type = 4 * self.alpha + 2 * (not self.greyscale) +\
              bool(self.palette)
  
          # http://www.w3.org/TR/PNG/#11IHDR
          write_chunk(outfile, 'IHDR',
                      struct.pack("!2I5B", self.width, self.height,
                                  self.bitdepth, color_type,
                                  0, 0, self.interlace))
          # See :chunk:order
          self.__write_srgb(outfile)
          # See :chunk:order
          # http://www.w3.org/TR/PNG/#11sBIT
          if not self.palette and self.pixbitdepth != self.bitdepth:
              # Write sBIT of palette within __write_palette
              # TODO: support different bitdepth per plane
              write_chunk(outfile, 'sBIT',
                          struct.pack('%dB' % self.planes,
                                      *[self.pixbitdepth] * self.planes))
          # :chunk:order: Without a palette (PLTE chunk), ordering is
          # relatively relaxed.  With one, gamma info must precede PLTE
          # chunk which must precede tRNS and bKGD.
          # See http://www.w3.org/TR/PNG/#5ChunkOrdering
          if self.palette:
              self.__write_palette(outfile)
  
          # http://www.w3.org/TR/PNG/#11tRNS
          if self.transparent is not None:
              if self.greyscale:
                  write_chunk(outfile, 'tRNS',
                              struct.pack("!1H", *self.transparent))
              else:
                  write_chunk(outfile, 'tRNS',
                              struct.pack("!3H", *self.transparent))
  
          # http://www.w3.org/TR/PNG/#11bKGD
          if self.background is not None:
              if self.greyscale:
                  write_chunk(outfile, 'bKGD',
                              struct.pack("!1H", *self.background))
              else:
                  write_chunk(outfile, 'bKGD',
                              struct.pack("!3H", *self.background))
          # http://www.w3.org/TR/PNG/#11pHYs
          if self.resolution is not None:
              write_chunk(outfile, 'pHYs',
                          struct.pack("!IIB",
                                      self.resolution[0][0],
                                      self.resolution[0][1],
                                      self.resolution[1]))
          # http://www.w3.org/TR/PNG/#11tIME
          if self.modification_time is not None:
              if self.modification_time is True:
                  self.modification_time = check_time('now')
              write_chunk(outfile, 'tIME',
                          struct.pack("!H5B", *(self.modification_time[:6])))
          # http://www.w3.org/TR/PNG/#11textinfo
          if self.text:
              self.__write_text(outfile)
          for idat in idat_sequence:
              write_chunk(outfile, 'IDAT', idat)
          # http://www.w3.org/TR/PNG/#11IEND
          write_chunk(outfile, 'IEND')