code: def _create_synth_folders_dataset(tmpdir):
      predict = Path(tmpdir / "predict")
      predict.mkdir()
  
      (predict / "images").mkdir()
      Image.new("RGB", (224, 224)).save(
          predict / "images" / "sample_one.png"
      )
      Image.new("RGB", (224, 224)).save(
          predict / "images" / "sample_two.png"
      )
  
      return os.fspath(Path(predict / "images"))
  
file_path: lightning-flash/tests/image/detection/test_data.py
imports: import json
  import os
  from pathlib import Path
  import pytest
  from flash.core.data.io.input import DataKeys
  from flash.core.utilities.imports import _FIFTYONE_AVAILABLE, _ICEVISION_AVAILABLE, _PIL_AVAILABLE
  from flash.image.detection.data import ObjectDetectionData
label_desc: Use image node_id 3 for calling a global function with example usage: _create_synth_folders_dataset(tmpdir) and returns: os