code: def test_partial_remove(bench_dvc, tmp_dir, dvc, dataset, remote):
      random.seed(5232)
      # Add/push full dataset
      bench_dvc("add", dataset)
      bench_dvc("push")
  
      # Remove some files
      for f in glob.glob("*", root_dir=dataset, recursive=True):  # type: ignore[call-arg]
          if random.random() > 0.5:  # noqa: S311
              if os.path.isfile(dataset / f):
                  os.remove(dataset / f)
              elif os.path.isdir(dataset / f):
                  shutil.rmtree(dataset / f)
  
      # Benchmark operations for removing files from dataset
      bench_dvc("add", dataset, name="update")
      bench_dvc("push", name="update")
      bench_dvc("gc", "-f", "-w")
      bench_dvc("gc", "-f", "-w", "-c", name="cloud")
  
file_path: dvc/dvc/testing/benchmarks/cli/stories/test_modify_data.py
imports: import glob
  import os
  import random
  import shutil
  import sys
  import pytest
label_desc: Use image node_id 2 for calling a global function with example usage: test_partial_remove(bench_dvc, tmp_dir, dvc, dataset, remote) without return types