code: def test_change_default_serialize_method(self):
      dataset = [1, 2, 3]
      with set_default_dataset_from_list_serialize_method(torch.tensor):
          dataset_1 = DatasetFromList(dataset, serialize=True)
          self.assertEqual(dataset_1[2], torch.tensor(3))
      dataset_2 = DatasetFromList(dataset, serialize=True)
      self.assertEqual(dataset_2[2], 3)
  
imports: import os
  import pickle
  import sys
  import unittest
  from functools import partial
  import torch
  from iopath.common.file_io import LazyPath
  from detectron2 import model_zoo
  from detectron2.config import get_cfg, instantiate
  from detectron2.data import DatasetCatalog, DatasetFromList, MapDataset, ToIterableDataset, build_batch_data_loader, build_detection_test_loader, build_detection_train_loader
  from detectron2.data.common import AspectRatioGroupedDataset, set_default_dataset_from_list_serialize_method
  from detectron2.data.samplers import InferenceSampler, TrainingSampler
label_desc: Use image node_id 3 for calling the TestDatasetFromList obj's underlying member method code with example usage: obj.test_change_default_serialize_method() without return types