docstr: Test that val_to_idx is correctly computed.
docstr_tok: ["Test","that","val_to_idx","is","correctly","computed","."]
code: def test_val_to_idx(self):
      """Test that val_to_idx is correctly computed."""
      t0 = torch.zeros(10, dtype=torch.int)
      t1 = torch.ones(10, dtype=torch.int)
      da = DataAttribute(torch.cat([t0, t1]), "task_labels")
      self.assertEqual(
          da.val_to_idx, {0: list(range(10)), 1: list(range(10, 20))}
      )
  
file_path: avalanche/tests/benchmarks/utils/test_data_attribute.py
imports: import unittest
  import numpy
  import torch
  from avalanche.benchmarks.utils import _taskaware_classification_subset, make_avalanche_dataset
  from avalanche.benchmarks.utils.data_attribute import DataAttribute, TensorDataAttribute
label_desc: Use image node_id 3 for calling the DataAttributeTests obj's underlying member method code with example usage: obj.test_val_to_idx() without return types