<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(self, fh):
 """ Write set to a GFF3 format file. :param file fh: file handle for file to write to """

        fh.write(GFF3_HEADER+"\n")
        for root in sorted(self.roots, key=self._recSortKey):
            self._writeRec(fh, root)