docs: def close(self):
          """Write remaining pages and close file handle."""
          if not self._truncate:
              self._write_remaining_pages()
          self._write_image_description()
          self._fh.close()