docstr: Test that data attributes are
  always returned in the same order
docstr_tok: ["Test","that","data","attributes","are","always","returned","in","the","same","order"]
code: def test_swap(self):
      """Test that data attributes are
      always returned in the same order"""
      # Fake x, y
      t1 = list(zip(np.arange(10), np.arange(10)))
      t2 = torch.ones(10).tolist()
      t3 = (torch.ones(10) * 2).tolist()
      t4 = (torch.ones(10) * 3).tolist()
  
      dataset = make_avalanche_dataset(
          t1,
          data_attributes=[
              TensorDataAttribute(
                  t2, name="logits", use_in_getitem=True
              ),
              TensorDataAttribute(
                  t3, name="logits2", use_in_getitem=True
              ),
          ],
      )
  
      # Now add another attribute
      dataset = make_avalanche_dataset(
          dataset,
          data_attributes=[
              TensorDataAttribute(
                  t4, name="logits0", use_in_getitem=True
              ),
          ],
      )
  
      self.assertSequenceEqual([0.0, 0.0, 1.0, 2.0, 3.0], dataset[0])
  
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 TensorDataAttributeTests obj's underlying member method code with example usage: obj.test_swap() without return types