code: def insert(word, num=1, skip_first=False, skip_last=False):
      """
      Perturb the word with 1 random character inserted.
  
      :param str word: target word
      :param int num: number of typos to add
      :param bool skip_first: whether insert char at the beginning of word
      :param bool skip_last: whether insert char at the end of word
      :return: perturbed strings
      """
  
      if len(word) <= 1:
          return word
  
      chars = list(word)
      start, end = get_start_end(word, skip_first, skip_last)
  
      if end - start + 2 < num:
          return None
  
      swap_idxes = random.sample(list(range(start, end + 2)), num)
      swap_idxes.sort(reverse=True)
  
      for idx in swap_idxes:
          insert_char = get_random_letter(
              chars[min(idx, len(chars) - 1)]
          )
          chars = chars[:idx] + [insert_char] + chars[idx:]
  
      return "".join(chars)
  
imports: import random
  import string
label_desc: Use image node_id 4 for calling a global function with example usage: insert(word, num, skip_first, skip_last) and returns: str, word, None