code: def _check_match_tokens(self, generated_ids, bad_words_ids):
      # for all bad word tokens
      for bad_word_ids in bad_words_ids:
          # for all slices in batch
          for generated_ids_slice in generated_ids:
              # for all word idx
              for i in range(
                  len(bad_word_ids), len(generated_ids_slice)
              ):
                  # if tokens match
                  if (
                      generated_ids_slice[i - len(bad_word_ids) : i]
                      == bad_word_ids
                  ):
                      return True
      return False
  
imports: from __future__ import annotations
  import copy
  import os
  import tempfile
  from importlib import import_module
  from math import isnan
  from transformers import is_tf_available
  from transformers.models.auto import get_values
  from transformers.testing_utils import _tf_gpu_memory_limit, require_tf, slow
  from ..test_modeling_tf_common import ids_tensor
label_desc: Use image node_id 11 for calling the TFCoreModelTesterMixin obj's underlying member method code with example usage: obj._check_match_tokens(generated_ids, bad_words_ids) and returns: False, True