<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def writeTypes(self, fd):
 """write out types module to file descriptor. """

        print >>fd, '#'*50
        print >>fd, '# file: %s.py' %self.getTypesModuleName()
        print >>fd, '#'
        print >>fd, '# schema types generated by "%s"' %self.__class__
        print >>fd, '#    %s' %' '.join(sys.argv)
        print >>fd, '#'
        print >>fd, '#'*50
                  
        print >>fd, TypesHeaderContainer()
        self.gatherNamespaces()
        for l in self.usedNamespaces.values():
            sd = SchemaDescription(do_extended=self.do_extended, 
                                   extPyClasses=self.extPyClasses)
            for schema in l:
                sd.fromSchema(schema)
            sd.write(fd)