code: def test_tensor_samples(args):
      p_metric = ImagesSamplePlugin(
          n_cols=5, n_rows=5, group=True, mode="train"
      )
  
      scenario = SplitMNIST(5)
      curr_exp = scenario.train_stream[0]
      for mb in DataLoader(curr_exp.dataset, batch_size=32):
          break
      curr_dataset = _make_taskaware_tensor_classification_dataset(
          *mb[:2], targets=mb[1]
      )
  
      strategy_mock = MagicMock(
          eval_mb_size=32,
          experience=curr_exp,
          adapted_dataset=curr_dataset,
      )
  
      mval = p_metric.after_train_dataset_adaptation(strategy_mock)
      img_grid = mval[0].value.image
  
file_path: avalanche/tests/evaluation/test_image_samples.py
imports: import unittest
  from unittest.mock import MagicMock
  from torch.utils.data import DataLoader
  from torchvision.transforms import Resize, Compose, ToTensor
  from avalanche.benchmarks import SplitMNIST
  from avalanche.benchmarks.utils import _make_taskaware_tensor_classification_dataset
  from avalanche.evaluation.metrics import ImagesSamplePlugin
label_desc: Use image node_id 2 for calling the ImageSamplesTests obj's underlying member method code with example usage: obj.test_tensor_samples(args) without return types