code: def setUp(self) -> None:
      self.test_dir = tempfile.TemporaryDirectory()
      test_path = self.test_dir.name
  
      sim_dataroot = os.path.join(test_path, "dataroot")
      if not os.path.isdir(sim_dataroot):
          os.makedirs(sim_dataroot)
  
      # Generate a fake dataset
      for d in sim_datalist["testing"] + sim_datalist["training"]:
          im, seg = create_test_image_3d(
              24, 24, 24, rad_max=10, num_seg_classes=1
          )
          nib_image = nib.Nifti1Image(im, affine=np.eye(4))
          image_fpath = os.path.join(sim_dataroot, d["image"])
          nib.save(nib_image, image_fpath)
  
          if "label" in d:
              nib_image = nib.Nifti1Image(seg, affine=np.eye(4))
              label_fpath = os.path.join(sim_dataroot, d["label"])
              nib.save(nib_image, label_fpath)
  
      sim_json_datalist = os.path.join(sim_dataroot, "sim_input.json")
      ConfigParser.export_config_file(sim_datalist, sim_json_datalist)
  
      data_src_cfg = os.path.join(test_path, "data_src_cfg.yaml")
      data_src = {
          "name": "sim_data",
          "task": "segmentation",
          "modality": "MRI",
          "datalist": sim_json_datalist,
          "dataroot": sim_dataroot,
          "multigpu": False,
          "class_names": ["label_class"],
      }
  
      ConfigParser.export_config_file(data_src, data_src_cfg)
      self.data_src_cfg = data_src_cfg
      self.test_path = test_path
  
file_path: MONAI/tests/test_integration_autorunner.py
imports: from __future__ import annotations
  import os
  import tempfile
  import unittest
  import nibabel
  import numpy
  import torch
  from monai.apps.auto3dseg import AutoRunner
  from monai.bundle.config_parser import ConfigParser
  from monai.data import create_test_image_3d
  from monai.utils import optional_import
  from tests.utils import SkipIfBeforePyTorchVersion, get_testing_algo_template_path, skip_if_downloading_fails, skip_if_no_cuda, skip_if_quick
label_desc: Use image node_id 1 for calling the TestAutoRunner obj's underlying member method code with example usage: obj.setUp() without return types