code: def get_in_turn_repetition(pred: List[str], is_cn: bool = False):
      """
      Get in-turn repetition.
      """
      if len(pred) == 0:
          return 1.0
      if isinstance(pred[0], str):
          pred = [tok.lower() for tok in pred]
          if is_cn:
              pred = "".join(pred)
      tri_grams = set()
      for i in range(len(pred) - 2):
          tri_gram = tuple(pred[i : i + 3])
          if tri_gram in tri_grams:
              return True
          tri_grams.add(tri_gram)
      return False
  
label_desc: Use image node_id 2 for calling a global function with example usage: get_in_turn_repetition(pred, is_cn) and returns: False, int, True