<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_dag(self, out=sys.stdout):
 """Write info for all GO Terms in obo file, sorted numerically."""

        for rec in sorted(self.values()):
            print(rec, file=out)