code: def zipfiles(fnames, archive, mode='w', log=lambda msg: None, cleanup=False):
      
      prefix = len(os.path.commonprefix([os.path.dirname(f) for f in fnames]))
      with zipfile.ZipFile(
              archive, mode, zipfile.ZIP_DEFLATED, allowZip64=True) as z:
          for f in fnames:
              log('Archiving %s' % f)
              z.write(f, f[prefix:])
              if cleanup:  # remove the zipped file
                  os.remove(f)
      log('Generated %s' % archive)
      return archive
docs: Build a zip archive from the given file names.
  
      :param fnames: list of path names
      :param archive: path of the archive