code: def simple_datamodule(tmpdir):
      train_dir = Path(tmpdir / "train")
      train_dir.mkdir()
  
      (train_dir / "a").mkdir()
      pa_1 = train_dir / "a" / "1.png"
      pa_2 = train_dir / "a" / "2.png"
      pb_1 = train_dir / "b" / "1.png"
      pb_2 = train_dir / "b" / "2.png"
      image_size = (96, 96)
      _rand_image(image_size).save(pa_1)
      _rand_image(image_size).save(pa_2)
  
      (train_dir / "b").mkdir()
      _rand_image(image_size).save(pb_1)
      _rand_image(image_size).save(pb_2)
  
      n = 10
      return ImageClassificationData.from_files(
          train_files=[str(pa_1)] * n
          + [str(pa_2)] * n
          + [str(pb_1)] * n
          + [str(pb_2)] * n,
          train_targets=[0] * n + [1] * n + [2] * n + [3] * n,
          test_files=[str(pa_1)] * n,
          test_targets=[0] * n,
          batch_size=2,
          num_workers=0,
          transform_kwargs={"image_size": image_size},
      )
  
file_path: lightning-flash/tests/image/classification/test_active_learning.py
imports: import math
  from pathlib import Path
  import flash
  import numpy
  import pytest
  import torch
  from flash.core.utilities.imports import _BAAL_AVAILABLE, _BAAL_GREATER_EQUAL_1_5_2, _TOPIC_IMAGE_AVAILABLE
  from flash.image import ImageClassificationData, ImageClassifier
  from flash.image.classification.integrations.baal import ActiveLearningDataModule, ActiveLearningLoop
  from pytorch_lightning import seed_everything
  from torch import nn
  from torch.utils.data import SequentialSampler
  from tests.image.classification.test_data import _rand_image
label_desc: Use image node_id 1 for calling a global function with example usage: simple_datamodule(tmpdir) and returns: ImageClassificationData