code: def _open_archive(path):
      
  
      if path.endswith('.zip'):
          return zipfile.ZipFile(path, 'r')
      return tarfile.open(path, 'r')
docs: :param path:
          A unicode string of the filesystem path to the archive
  
      :return:
          An archive object