code: def test_classification_fiftyone(tmpdir):
      tmpdir = Path(tmpdir)
  
      (tmpdir / "a").mkdir()
      (tmpdir / "b").mkdir()
      _rand_image().save(tmpdir / "a_1.png")
      _rand_image().save(tmpdir / "b_1.png")
  
      train_images = [
          str(tmpdir / "a_1.png"),
          str(tmpdir / "b_1.png"),
      ]
  
      train_dataset = fo.Dataset.from_dir(
          str(tmpdir), dataset_type=fo.types.ImageDirectory
      )
      s1 = train_dataset[train_images[0]]
      s2 = train_dataset[train_images[1]]
      s1["test"] = fo.Classification(label="1")
      s2["test"] = fo.Classification(label="2")
      s1.save()
      s2.save()
  
      data = ImageClassificationData.from_fiftyone(
          train_dataset=train_dataset,
          label_field="test",
          batch_size=2,
          num_workers=0,
          transform_kwargs={"image_size": (64, 64)},
      )
  
      model = ImageClassifier(num_classes=2, backbone="resnet18")
      trainer = Trainer(default_root_dir=tmpdir, fast_dev_run=True)
      trainer.finetune(model, datamodule=data, strategy="freeze")
  
file_path: lightning-flash/tests/image/classification/test_data_model_integration.py
imports: from pathlib import Path
  import numpy
  import pytest
  from flash import Trainer
  from flash.core.utilities.imports import _FIFTYONE_AVAILABLE, _PIL_AVAILABLE, _TOPIC_IMAGE_AVAILABLE
  from flash.image import ImageClassificationData, ImageClassifier
label_desc: Use image node_id 3 for calling a global function with example usage: test_classification_fiftyone(tmpdir) without return types