code: def get_cross_turn_repetition(
      context, pred_tokens, eos_idx, is_cn=False
  ):
      """Get cross-turn repetition."""
      if len(pred_tokens) == 0:
          return 1.0
      if is_cn:
          context = ["".join(utt) for utt in context]
          pred_tokens = "".join(pred_tokens)
  
      pred_tri_grams = set()
      for i in range(len(pred_tokens) - 2):
          tri_gram = tuple(pred_tokens[i : i + 3])
          pred_tri_grams.add(tri_gram)
      for utt in context:
          for i in range(len(utt) - 2):
              tri_gram = tuple(utt[i : i + 3])
              if tri_gram in pred_tri_grams:
                  return 1.0
      return 0.0
  
imports: from collections import namedtuple
  import paddle
  import paddle.nn
  import paddle.nn.functional
label_desc: Use image node_id 3 for calling a global function with example usage: get_cross_turn_repetition(context, pred_tokens, eos_idx, is_cn) and returns: int, int, int