code: def test_mt_single_dataset_task_size(self):
      mnist_train = MNIST(
          root=default_dataset_location("mnist"),
          train=True,
          download=True,
      )
      mnist_test = MNIST(
          root=default_dataset_location("mnist"),
          train=False,
          download=True,
      )
      my_nc_benchmark = nc_benchmark(
          mnist_train,
          mnist_test,
          3,
          task_labels=True,
          per_exp_classes={0: 5, 2: 2},
          class_ids_from_zero_in_each_exp=True,
      )
  
      self.assertEqual(3, my_nc_benchmark.n_experiences)
      self.assertEqual(10, my_nc_benchmark.n_classes)
  
      all_classes = set()
      for task_id in range(3):
          all_classes.update(
              my_nc_benchmark.classes_in_experience["train"][task_id]
          )
      self.assertEqual(5, len(all_classes))
  
      self.assertEqual(
          5, len(my_nc_benchmark.classes_in_experience["train"][0])
      )
      self.assertEqual(
          3, len(my_nc_benchmark.classes_in_experience["train"][1])
      )
      self.assertEqual(
          2, len(my_nc_benchmark.classes_in_experience["train"][2])
      )
  
imports: import unittest
  from os.path import expanduser
  import torch
  from torchvision.datasets import MNIST
  from avalanche.benchmarks.datasets import default_dataset_location
  from avalanche.benchmarks.scenarios.deprecated.new_classes import NCExperience
  from avalanche.benchmarks.utils import _taskaware_classification_subset
  from avalanche.benchmarks.scenarios.deprecated.new_classes.nc_utils import make_nc_transformation_subset
  from avalanche.benchmarks import nc_benchmark, ClassificationStream
label_desc: Use image node_id 7 for calling the MultiTaskTests obj's underlying member method code with example usage: obj.test_mt_single_dataset_task_size() without return types