def METHOD_NAME(self) -> None:
    state_dict = {
        "key0": 1,
        "key1": [1, 2],
        "key2": {1: 2, 2: 3},
        "key3": torch.tensor([1]),
    }
    data = {}
    def collect_data(path, value):
        nonlocal data
        data[path] = value
    _traverse.traverse_state_dict(state_dict, collect_data)
    self.assertIn(("key0",), data)
    self.assertEqual(data[("key0",)], 1)
    self.assertIn(("key1",), data)
    self.assertEqual(data[("key1",)], [1, 2])
    self.assertIn(("key2",), data)
    self.assertEqual(data[("key2",)], {1: 2, 2: 3})
    self.assertIn(("key3",), data)
    self.assertEqual(data[("key3",)], torch.tensor([1]))