def generate_zip_with_7za(root_dir, file_paths, archive_path):

  arg_list = ['7za', 'a', archive_path, '-tzip', '-mx=7', '-bd', '--']
  arg_list.extend(file_paths)
  with temp_chdir(root_dir):
    # capture but discard output
    subprocess.check_output(arg_list)
file_paths is a list of files relative to root_dir, these will be the names
dataset/ETHPy150Open googlei18n/nototools/nototools/tool_utils.py/generate_zip_with_7za