code: def test_fastface_training():
      dataset = ff.dataset.FDDBDataset(source_dir="data/", phase="val")
      datamodule = FaceDetectionData.from_datasets(
          train_dataset=dataset, predict_dataset=dataset, batch_size=2
      )
  
      model = FaceDetector(model="lffd_slim")
  
      # test fit
      trainer = flash.Trainer(fast_dev_run=True)
      trainer.finetune(model, datamodule=datamodule, strategy="freeze")
      trainer.predict(model, datamodule=datamodule)
  
file_path: lightning-flash/tests/image/face_detection/test_model.py
imports: import contextlib
  from unittest.mock import patch
  import flash
  import pytest
  from flash.__main__ import main
  from flash.core.registry import FlashRegistry
  from flash.core.utilities.imports import _FASTFACE_AVAILABLE
  from flash.image import FaceDetectionData, FaceDetector
label_desc: Use image node_id 1 for calling a global function with example usage: test_fastface_training() without return types