<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 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)