code: def extract_site_packages(archive, target_path, compile_pyc, compile_workers=0, force=False):
      
      parent = target_path.parent
      target_path_tmp = Path(parent, target_path.stem + ".tmp")
      lock = Path(parent, target_path.stem + ".lock")
  
      # If this is the first time that a pyz is being extracted, we'll need to create the ~/.shiv dir
      if not parent.exists():
          parent.mkdir(parents=True, exist_ok=True)
  
      with FileLock(lock):
  
          # we acquired a lock, it's possible that prior invocation was holding the lock and has
          # completed bootstrapping, so let's check (again) if we need to do any work
          if not target_path.exists() or force:
  
              # extract our site-packages
              for filename in archive.namelist():
                  if filename.startswith("site-packages"):
                      archive.extract(filename, target_path_tmp)
  
              if compile_pyc:
                  compileall.compile_dir(target_path_tmp, quiet=2, workers=compile_workers)
  
              # if using `force` we will need to delete our target path
              if target_path.exists():
                  shutil.rmtree(str(target_path))
  
              # atomic move
              shutil.move(str(target_path_tmp), str(target_path))
docs: Extract everything in site-packages to a specified path.
  
      :param ZipFile archive: The zipfile object we are bootstrapping from.
      :param Path target_path: The path to extract our zip to.