code: def test_copy_all_conflict_overwrite(tmp_path):
      """Test that on_conflict=overwrite overwrites an
      existing attribute in the destination."""
  
      src = h5py.File(tmp_path / "src", "w")
      src["x"] = 1
  
      dst = h5py.File(tmp_path / "dst", "w")
      dst["x"] = 2
  
      hdf5.copy_all(src, dst, on_conflict="overwrite")
  
      assert int(dst["x"][()]) == 1
  
file_path: pennylane/tests/data/base/test_hdf5.py
imports: from unittest.mock import MagicMock
  import pytest
  from pennylane.data.base import hdf5
label_desc: Use image node_id 4 for calling a global function with example usage: test_copy_all_conflict_overwrite(tmp_path) without return types