code: def test_benchmark_from_datasets(self):
      d1 = AvalancheDataset(dummy_tensor_dataset())
      d2 = AvalancheDataset(dummy_tensor_dataset())
      d3 = AvalancheDataset(dummy_tensor_dataset())
      d4 = AvalancheDataset(dummy_tensor_dataset())
  
      bm = benchmark_from_datasets(train=[d1, d2], test=[d3, d4])
  
      # train stream
      train_s = bm.streams["train"]
      assert len(train_s) == 2
      for eid, (exp, d_orig) in enumerate(zip(train_s, [d1, d2])):
          assert exp.current_experience == eid
          for ii, (x, y) in enumerate(exp.dataset):
              torch.testing.assert_close(x, d_orig[ii][0])
              torch.testing.assert_close(y, d_orig[ii][1])
  
      # test stream
      train_s = bm.streams["test"]
      assert len(train_s) == 2
      for eid, (exp, d_orig) in enumerate(zip(train_s, [d3, d4])):
          assert exp.current_experience == eid
          for ii, (x, y) in enumerate(exp.dataset):
              torch.testing.assert_close(x, d_orig[ii][0])
              torch.testing.assert_close(y, d_orig[ii][1])
  
imports: import unittest
  import torch
  from numpy.testing import assert_almost_equal
  from torch.utils.data import TensorDataset, DataLoader
  from avalanche.benchmarks import benchmark_from_datasets, benchmark_with_validation_stream, CLScenario, CLStream, split_validation_random, task_incremental_benchmark
  from avalanche.benchmarks.scenarios.dataset_scenario import DatasetExperience, split_validation_class_balanced
  from avalanche.benchmarks.utils import AvalancheDataset
  from tests.unit_tests_utils import dummy_tensor_dataset, get_fast_benchmark, DummyImageDataset
label_desc: Use image node_id 1 for calling the DatasetScenarioTests obj's underlying member method code with example usage: obj.test_benchmark_from_datasets() without return types