code: def part_name(self, basename='/tmp/sitemap.xml', part_number=0):
          
          # Work out how to name the sitemaps, attempt to add %05d before
          # ".xml$", else append
          sitemap_prefix = basename
          sitemap_suffix = '.xml'
          if (basename[-4:] == '.xml'):
              sitemap_prefix = basename[:-4]
          return(sitemap_prefix + ("%05d" % (part_number)) + sitemap_suffix)
docs: Name (file or URI) for one component sitemap.
  
          Works for both filenames and URIs because manipulates only the end
          of the string.
  
          Abstracting this into a function that starts from the basename to get
          prefix and suffix each time seems a bit wasteful but perhaps not worth
          worrying about. Allows same code to be used for the write() and
          as_xml_index() cases.