code: def test_swap(self):
      texts = ["The quick brown fox jumps over the lazy dog"]
      aug = naw.RandomWordAug(action="swap")
  
      for text in texts:
          tokens = text.lower().split(" ")
          orig_token_freq = {}
          for w in tokens:
              orig_token_freq[w] = tokens.count(w)
  
          augmented_text = text
  
          # https://github.com/makcedward/nlpaug/issues/77
          for i in range(10):
              augmented_data = aug.augment(augmented_text)
              augmented_text = augmented_data[0]
  
          aug_tokens = augmented_text.lower().split(" ")
          aug_token_freq = {}
          for w in tokens:
              aug_token_freq[w] = aug_tokens.count(w)
  
          for orig_token, orig_freq in orig_token_freq.items():
              self.assertTrue(orig_token in aug_token_freq)
              self.assertTrue(aug_token_freq[orig_token] == orig_freq)
  
          self.assertNotEqual(text, augmented_text)
  
file_path: nlpaug/test/augmenter/word/test_random_word.py
imports: import unittest
  import nlpaug.augmenter.word
label_desc: Use image node_id 1 for calling the TestRandom obj's underlying member method code with example usage: obj.test_swap() without return types