code: def test_generate(self):
      # test task transformation
      trans_methods = ["ModifyPos"]
      gene = MRCCNGenerator(trans_methods=trans_methods, sub_methods=[])
      for original_samples, trans_rst, trans_type in gene.generate(
          dataset
      ):
          self.assertEqual(1, len(trans_rst))
          for index in range(len(original_samples)):
              ori_sample = original_samples[index]
              tran_sample = trans_rst[index]
              self.assertEqual(
                  ori_sample.get_words("question"),
                  tran_sample.get_words("question"),
              )
              ori_answers = ori_sample.get_answers()
              tran_answers = tran_sample.dump()["answers"]
              for i in range(len(ori_answers)):
                  self.assertEqual(
                      ori_answers[i]["text"], tran_answers[i]["text"]
                  )
  
      # test wrong trans_methods
      gene = MRCCNGenerator(
          trans_methods=["wrong_transform_method"], sub_methods=[]
      )
      self.assertRaises(ValueError, next, gene.generate(dataset))
      gene = MRCCNGenerator(
          trans_methods=["AddSubtree"], sub_methods=[]
      )
      self.assertRaises(ValueError, next, gene.generate(dataset))
      gene = MRCCNGenerator(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.mrccn_generator import MRCCNGenerator
  from textflint.input.component.sample import MRCCnSample
label_desc: Use image node_id 1 for calling the TestMRCGenerator obj's underlying member method code with example usage: obj.test_generate() without return types