code: def test_cleanup(make_synthetic_dataset):
      """Tests if the temporary directory is cleaned up when the instance is deleted."""
      synthetic_dataset = make_synthetic_dataset()
      root = synthetic_dataset.root
      del synthetic_dataset
      assert not 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 6 for calling a global function with example usage: test_cleanup(make_synthetic_dataset) without return types