code: def test_EntityTyposSwap(self):
      # TODO 基类会增加transform 输入校验
      # self.assertRaises(AssertionError, swap_ins.transform, '')
      # self.assertRaises(AssertionError, swap_ins.transform, [])
      # self.assertRaises(AssertionError, swap_ins.transform, SASample)
  
      # test data with no entity
      data = NERSample(
          {
              "x": data_sample.get_words("text"),
              "y": ["O"] * len(data_sample.get_words("text")),
          }
      )
      self.assertEqual([], swap_ins.transform(data))
  
      # test faction
      change = swap_ins.transform(data_sample, n=5)
      self.assertTrue(5 == len(change))
      for item in change:
          for ori_word, trans_word, tags in zip(
              data_sample.get_words("text"),
              item.get_words("text"),
              data_sample.get_value("tags"),
          ):
              self.assertTrue(
                  ori_word == trans_word
                  if tags == "O"
                  else ori_word != trans_word
              )
  
file_path: textflint/test/generation/transformation/NER/test_ent_typos.py
imports: import unittest
  import editdistance
  from textflint.input.component.sample.ner_sample import NERSample
  from textflint.generation.transformation.NER.ent_typos import EntTypos
  from textflint.common.utils.word_op import *
label_desc: Use image node_id 4 for calling the TestSpecialEntityTyposSwap obj's underlying member method code with example usage: obj.test_EntityTyposSwap() without return types