code: def swap_letters(word):
      if len(word) < 4:
          return word
      swapped = list(range(len(word)))
      max_swap = randint(1, min(3, len(word) // 2 - 1))
      idxs = sample(range(1, len(word) - 2), max_swap)
      for i in idxs:
          swapped[i], swapped[i + 1] = swapped[i + 1], swapped[i]
      return "".join([word[i] for i in swapped])
  
file_path: artificial-adversary/Adversary/attacks.py
imports: from random import choice, randint, sample, randrange
  from string import punctuation
  from Adversary.constants import *
label_desc: Use image node_id 6 for calling a global function with example usage: swap_letters(word) and returns: str, word