docs: def write_header(self):
          """Write the MAR header to the file.
  
          The MAR header includes the MAR magic bytes as well as the offset to
          where the index data can be found.
          """
          self.fileobj.seek(0)
          header = mar_header.build(dict(index_offset=self.last_offset))
          self.fileobj.write(header)