class_docstr: [`TFLogitsProcessor`] that enforces that specified sequences will never be sampled.
  
  Args:
      bad_words_ids (`List[List[int]]`):
          List of list of token ids that are not allowed to be generated. In order to get the tokens of the words
          that should not appear in the generated text, use `tokenizer(bad_word, add_prefix_space=True).input_ids`.
      eos_token_id (`int`):
          The id of the *end-of-sequence* token.
class_docstr_tok: ["[","`","TFLogitsProcessor","`","]","that","enforces","that","specified","sequences","will","never","be","sampled",".","Args",":","bad_words_ids","(","`","List","[","List","[","int","]","]","`",")",":","List","of","list","of","token","ids","that","are","not","allowed","to","be","generated",".","In","order","to","get","the","tokens","of","the","words","that","should","not","appear","in","the","generated","text",",","use","`","tokenizer","(","bad_word",",","add_prefix_space=True",")",".input_ids","`",".","eos_token_id","(","`","int","`",")",":","The","id","of","the","*","end-of-sequence","*","token","."]
code: def _calc_row_banned_bad_tokens(
      self, row_input_ids: tf.Tensor
  ) -> tf.Tensor:
      def _tokens_match(bad_word_seq_number):
          def _len_one():
              # If the bad sequence only has one token, always mask it
              return tf.cond(
                  tf.math.equal(
                      self.bad_word_seqs_len[bad_word_seq_number], 1
                  ),
                  lambda: tf.ones((), dtype=tf.bool),
                  _len_greater_than_cur_len,
              )
  
          def _len_greater_than_cur_len():
              # Otherwise, if the bad sequence is longer than the current length they can't ever match
              return tf.cond(
                  tf.math.greater(
                      self.bad_word_seqs_len[bad_word_seq_number],
                      tf.shape(row_input_ids)[0],
                  ),
                  lambda: tf.zeros((), dtype=tf.bool),
                  _match_found,
              )
  
          def _match_found():
              # Finaly, runs the actual comparison. Can only be called if the previous comparisons do not yield
              # an answer (otherwise we get indexing exceptions)
              compare_len = (
                  self.bad_word_seqs_len[bad_word_seq_number] - 1
              )
              return tf.cond(
                  tf.math.reduce_all(
                      tf.math.equal(
                          row_input_ids[-compare_len:],
                          self.bad_word_seqs_ids[
                              bad_word_seq_number, :compare_len
                          ],
                      )
                  ),
                  lambda: tf.ones((), dtype=tf.bool),
                  lambda: tf.zeros((), dtype=tf.bool),
              )
  
          match = _len_one()
          return match
  
      # Compares the current row against all bad word sequences, obtaining a mask with the matches.
      match_mask = tf.map_fn(
          _tokens_match,
          tf.range(self.bad_word_seqs_ids.shape[0]),
          fn_output_signature=tf.bool,
      )
      row_banned_tokens = self.seq_forbidden_tokens[match_mask]
      return row_banned_tokens
  
imports: import inspect
  from typing import List, Tuple
  import numpy
  import tensorflow
  from .tf_utils import stable_softmax
  from .utils import add_start_docstrings
  from .utils.logging import get_logger
label_desc: Use image node_id 2 for calling the TFNoBadWordsLogitsProcessor obj's underlying member method code with example usage: obj._calc_row_banned_bad_tokens(row_input_ids) and returns: row_banned_tokens, match, tf, tf, tf