code: def test_batch_encode_plus_tensors(self):
      tokenizers = self.get_tokenizers(do_lower_case=False)
      for tokenizer in tokenizers:
          with self.subTest(f"{tokenizer.__class__.__name__}"):
              sequences = [
                  "Testing batch encode plus",
                  "Testing batch encode plus with different sequence lengths",
                  "Testing batch encode plus with different sequence lengths correctly pads",
              ]
  
              table = self.get_table(tokenizer, length=0)
  
              # A Tensor cannot be build by sequences which are not the same size
              self.assertRaises(
                  ValueError,
                  tokenizer.batch_encode_plus,
                  table,
                  sequences,
                  return_tensors="pt",
              )
              self.assertRaises(
                  ValueError,
                  tokenizer.batch_encode_plus,
                  table,
                  sequences,
                  return_tensors="tf",
              )
  
              if tokenizer.pad_token_id is None:
                  self.assertRaises(
                      ValueError,
                      tokenizer.batch_encode_plus,
                      table,
                      sequences,
                      padding=True,
                      return_tensors="pt",
                  )
                  self.assertRaises(
                      ValueError,
                      tokenizer.batch_encode_plus,
                      table,
                      sequences,
                      padding="longest",
                      return_tensors="tf",
                  )
              else:
                  pytorch_tensor = tokenizer.batch_encode_plus(
                      table,
                      sequences,
                      padding=True,
                      return_tensors="pt",
                  )
                  tensorflow_tensor = tokenizer.batch_encode_plus(
                      table,
                      sequences,
                      padding="longest",
                      return_tensors="tf",
                  )
                  encoded_sequences = tokenizer.batch_encode_plus(
                      table, sequences, padding=True
                  )
  
                  for key in encoded_sequences.keys():
                      pytorch_value = pytorch_tensor[key].tolist()
                      tensorflow_value = (
                          tensorflow_tensor[key].numpy().tolist()
                      )
                      encoded_value = encoded_sequences[key]
  
                      self.assertEqual(
                          pytorch_value, tensorflow_value, encoded_value
                      )
  
imports: import json
  import os
  import shutil
  import tempfile
  import unittest
  from typing import List
  import pandas
  from transformers import AddedToken, TapexTokenizer
  from transformers.models.tapex.tokenization_tapex import VOCAB_FILES_NAMES
  from transformers.testing_utils import is_pt_tf_cross_test, require_pandas, slow
  from ...test_tokenization_common import TokenizerTesterMixin
label_desc: Use image node_id 13 for calling the TapexTokenizationTest obj's underlying member method code with example usage: obj.test_batch_encode_plus_tensors() without return types