code: def test_class_incremental_benchmark_basic_num_experiences(self):
      tx = torch.rand(10, 17)
      ty = torch.tensor([1 for _ in range(10)])
      data = _make_taskaware_tensor_classification_dataset(tx, ty)
  
      tx = torch.rand(10, 15)
      ty = torch.tensor([0 for _ in range(10)])
      data = data.concat(
          _make_taskaware_tensor_classification_dataset(tx, ty)
      )
  
      tx = torch.rand(10, 17)
      ty = torch.tensor([2 for _ in range(10)])
      data = data.concat(
          _make_taskaware_tensor_classification_dataset(tx, ty)
      )
  
      bm = class_incremental_benchmark(
          datasets_dict={"train": data, "test": data},
          class_order=[2, 1, 0],
          num_experiences=3,
      )
      bm = with_classes_timeline(bm)
      assert len(bm.streams) == 2
  
      # train_stream - class order is [11, 3, 4]
      stream = bm.train_stream
      assert len(stream) == 3
      assert stream[0].classes_in_this_experience == {2}
      assert len(stream[0].dataset) == 10
      assert stream[1].classes_in_this_experience == {1}
      assert len(stream[1].dataset) == 10
      assert stream[2].classes_in_this_experience == {0}
      assert len(stream[2].dataset) == 10
      assert len(stream[0].dataset) + len(stream[1].dataset) + len(
          stream[2].dataset
      ) == len(data)
  
      # test_stream - class order is [11, 3, 4]
      stream = bm.test_stream
      assert len(stream) == 3
      assert stream[0].classes_in_this_experience == {2}
      assert len(stream[0].dataset) == 10
      assert stream[1].classes_in_this_experience == {1}
      assert len(stream[1].dataset) == 10
      assert stream[2].classes_in_this_experience == {0}
      assert len(stream[2].dataset) == 10
      assert len(stream[0].dataset) + len(stream[1].dataset) + len(
          stream[2].dataset
      ) == len(data)
  
file_path: avalanche/tests/benchmarks/scenarios/test_supervised_scenario.py
imports: import unittest
  import torch
  from avalanche.benchmarks.scenarios import _split_dataset_by_attribute
  from avalanche.benchmarks.scenarios.supervised import class_incremental_benchmark, new_instances_benchmark, with_classes_timeline
  from avalanche.benchmarks.utils import _make_taskaware_tensor_classification_dataset
  from tests.unit_tests_utils import dummy_classification_datasets
label_desc: Use image node_id 1 for calling the ClassIncrementalBenchmark obj's underlying member method code with example usage: obj.test_class_incremental_benchmark_basic_num_experiences() without return types