code: def write_index(self):
          
          self.fileobj.seek(self.last_offset)
          index = index_header.build(dict(entries=self.entries))
          self.fileobj.write(index)
          self.filesize = self.fileobj.tell()
docs: Write the index of all our files to the MAR file.