code: def test_example(folder, fname):
      run_test(str(root / "examples" / folder / fname))
  
      # clean ALL logs and used data
      shutil.rmtree(root / "data", ignore_errors=True)
      shutil.rmtree(root / "lightning_logs", ignore_errors=True)
  
      # remove all saved models
      for p in root.glob("*.pt"):
          p.unlink()
  
file_path: lightning-flash/tests/examples/test_scripts.py
imports: import os
  import shutil
  import sys
  from pathlib import Path
  from unittest.mock import patch
  import pytest
  import torch
  from flash.core.utilities.imports import _BAAL_AVAILABLE, _FIFTYONE_AVAILABLE, _ICEDATA_AVAILABLE, _ICEVISION_AVAILABLE, _LEARN2LEARN_AVAILABLE, _SEGMENTATION_MODELS_AVAILABLE, _TOPIC_AUDIO_AVAILABLE, _TOPIC_CORE_AVAILABLE, _TOPIC_GRAPH_AVAILABLE, _TOPIC_IMAGE_AVAILABLE, _TOPIC_POINTCLOUD_AVAILABLE, _TOPIC_TABULAR_AVAILABLE, _TOPIC_TEXT_AVAILABLE, _TOPIC_VIDEO_AVAILABLE, _TORCHVISION_GREATER_EQUAL_0_9, _VISSL_AVAILABLE
  from tests.examples.helpers import run_test
  from tests.helpers.decorators import forked
label_desc: Use image node_id 1 for calling a global function with example usage: test_example(folder, fname) without return types