code: def test_generate(self):
      # test task transformation
      trans_methods = ["SwapBirth", "SwapAge"]
      gene = REGenerator(trans_methods=trans_methods, sub_methods=[])
      for original_samples, trans_rst, trans_type in gene.generate(
          dataset
      ):
          self.assertEqual(1, len(original_samples))
          for index in range(len(original_samples)):
              self.assertTrue(
                  original_samples[index] != trans_rst[index]
              )
  
      # test wrong trans_methods
      gene = REGenerator(
          trans_methods=["wrong_transform_method"], sub_methods=[]
      )
      self.assertRaises(ValueError, next, gene.generate(dataset))
      gene = REGenerator(trans_methods=["AddSubtree"], sub_methods=[])
      self.assertRaises(ValueError, next, gene.generate(dataset))
      gene = REGenerator(trans_methods="OOV", sub_methods=[])
      self.assertRaises(ValueError, next, gene.generate(dataset))
  
imports: import unittest
  from textflint.input.dataset import Dataset
  from textflint.generation.generator.re_generator import REGenerator
label_desc: Use image node_id 1 for calling the TestSpecialEntityTyposSwap obj's underlying member method code with example usage: obj.test_generate() without return types