code: def test_dump_overwrite(
      three_experiments_branch_same_name_trials_benchmarks,
      capsys,
      testing_helpers,
      tmp_path,
  ):
      """Test dump with overwrite argument"""
      dump_path = f"{tmp_path}/dump.pkl"
      try:
          execute(f"db dump -o {dump_path}")
          assert os.path.isfile(dump_path)
          dumped_db = PickledDB(dump_path)
          testing_helpers.assert_tested_db_structure(dumped_db)
  
          # No overwrite by default. Should fail.
          execute(f"db dump -o {dump_path}", assert_code=1)
          captured = capsys.readouterr()
          assert captured.err.strip().startswith(
              "Error: Export output already exists (specify `--force` to overwrite) at"
          )
  
          # Overwrite. Should pass.
          execute(f"db dump --force -o {dump_path}")
          assert os.path.isfile(dump_path)
          testing_helpers.assert_tested_db_structure(dumped_db)
      finally:
          clean_dump(dump_path)
  
file_path: orion/tests/functional/commands/test_db_dump.py
imports: import os
  import pytest
  import orion.core.cli
  from orion.core.io.database.pickleddb import PickledDB
  from orion.storage.base import setup_storage
label_desc: Use image node_id 5 for calling a global function with example usage: test_dump_overwrite(three_experiments_branch_same_name_trials_benchmarks, capsys, testing_helpers, tmp_path) without return types