class_docstr: Tests for the Dataset class
docstr: test_factory: Test that dataset->factory->dataset preserves type
docstr_tok: ["test_factory",":","Test","that","dataset-",">","factory-",">","dataset","preserves","type"]
code: def test_factory(self):
      """test_factory: Test that dataset->factory->dataset preserves type"""
      d1 = LightweightDataset()
      factory = d1.get_factory()
      d2 = factory()
      self.assertTrue(type(d1) is type(d2))
  
imports: from cleverhans.dataset import Dataset
  from cleverhans.devtools.checks import CleverHansTest
label_desc: Use image node_id 1 for calling the TestDataset obj's underlying member method code with example usage: obj.test_factory() without return types