code: def test_copy(make_synthetic_dataset):
      """Tests if the dataset is copied correctly, and files still exist after original instance is deleted."""
      synthetic_dataset = make_synthetic_dataset()
      synthetic_dataset_cp = copy(synthetic_dataset)
      assert all(
          synthetic_dataset.samples == synthetic_dataset_cp.samples
      )
      del synthetic_dataset
      assert synthetic_dataset_cp.root.exists()
  
file_path: anomalib/tests/pre_merge/datasets/test_synthetic_data.py
imports: from copy import copy, deepcopy
  from pathlib import Path
  import pytest
  from anomalib.data.folder import FolderDataset
  from anomalib.data.synthetic import SyntheticAnomalyDataset
  from anomalib.data.utils import get_transforms
  from tests.helpers.dataset import get_dataset_path
label_desc: Use image node_id 7 for calling a global function with example usage: test_copy(make_synthetic_dataset) without return types