<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, basename="/tmp/resynclist.xml"):
 """Write a single sitemap or sitemapindex XML document. Must be overridden to support multi-file lists. """

        self.default_capability()
        fh = open(basename, 'w')
        s = self.new_sitemap()
        s.resources_as_xml(self, fh=fh, sitemapindex=self.sitemapindex)
        fh.close()