code: def test_predict(a_data_module, a_pl_module):
      trainer = BaalTrainer(
          dataset=a_data_module.active_dataset,
          max_epochs=3,
          default_root_dir="/tmp",
      )
      active_set = a_data_module.active_dataset
      alt = trainer.predict_on_dataset(
          a_pl_module, a_data_module.pool_dataloader()
      )
      assert len(alt) == len(active_set.pool)
  
      # Replicate = False works too!
      a_pl_module.hparams.replicate_in_memory = False
      alt = trainer.predict_on_dataset(
          a_pl_module, a_data_module.pool_dataloader()
      )
      assert len(alt) == len(active_set.pool)
  
imports: import copy
  from dataclasses import dataclass, asdict
  import numpy
  import pytest
  import torch
  from baal.active import ActiveLearningDataset
  from baal.utils.pytorch_lightning import ActiveLightningModule, BaalTrainer, ResetCallback, BaaLDataModule
  from pytorch_lightning import LightningModule
  from torch.utils.data import Dataset, DataLoader
  from torchvision.models import vgg16
label_desc: Use image node_id 7 for calling a global function with example usage: test_predict(a_data_module, a_pl_module) without return types