code: def save(self, pkg_file):
          
          for part in self.parts:
              part.before_marshal()
          PackageWriter.write(pkg_file, self.rels, self.parts)
docs: Save this package to *pkg_file*, where *file* can be either a path to
          a file (a string) or a file-like object.