code: def preamble(self, lenient=False):
          
  
          self.validate_signature()
  
          while True:
              if not self.atchunk:
                  self.atchunk = self._chunk_len_type()
                  if self.atchunk is None:
                      raise FormatError('This PNG file has no IDAT chunks.')
              if self.atchunk[1] == b'IDAT':
                  return
              self.process_chunk(lenient=lenient)
docs: Extract the image metadata by reading
          the initial part of the PNG file up to
          the start of the ``IDAT`` chunk.
          All the chunks that precede the ``IDAT`` chunk are
          read and either processed for metadata or discarded.
  
          If the optional `lenient` argument evaluates to `True`,
          checksum failures will raise warnings rather than exceptions.