code: def delete_characters(word):
      if len(word) < 4:
          return word
      max_del = 1 if len(word) <= 5 else 2
      idxs_delete = sample(range(1, len(word) - 1), max_del)
      return "".join(
          [c for i, c in enumerate(list(word)) if i not in idxs_delete]
      )
  
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 9 for calling a global function with example usage: delete_characters(word) and returns: str, word