code: def test_image_detector_data_from_fiftyone(tmpdir):
      train_dataset = _create_synth_fiftyone_dataset(tmpdir)
  
      datamodule = ObjectDetectionData.from_fiftyone(
          train_dataset=train_dataset,
          batch_size=1,
          transform_kwargs={"image_size": 128},
      )
  
      data = next(iter(datamodule.train_dataloader()))
      sample = data[0]
      assert sample[DataKeys.INPUT].shape == (128, 128, 3)
  
      datamodule = ObjectDetectionData.from_fiftyone(
          train_dataset=train_dataset,
          val_dataset=train_dataset,
          test_dataset=train_dataset,
          batch_size=1,
          num_workers=0,
          transform_kwargs={"image_size": 128},
      )
  
      data = next(iter(datamodule.val_dataloader()))
      sample = data[0]
      assert sample[DataKeys.INPUT].shape == (128, 128, 3)
  
      data = next(iter(datamodule.test_dataloader()))
      sample = data[0]
      assert sample[DataKeys.INPUT].shape == (128, 128, 3)
  
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 7 for calling a global function with example usage: test_image_detector_data_from_fiftyone(tmpdir) without return types