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 inspect
  import os
  import shutil
  import tempfile
  import unittest
  from typing import List
  import numpy
  import pandas
  from transformers import AddedToken
  from transformers.models.tapas.tokenization_tapas import VOCAB_FILES_NAMES, BasicTokenizer, TapasTokenizer, WordpieceTokenizer, _is_control, _is_punctuation, _is_whitespace
  from transformers.testing_utils import is_pt_tf_cross_test, require_pandas, require_scatter, require_tensorflow_probability, require_tokenizers, require_torch, slow
  from ...test_tokenization_common import TokenizerTesterMixin, filter_non_english, merge_model_tokenizer_mappings
label_desc: Use image node_id 51 for calling the TapasTokenizationTest obj's underlying member method code with example usage: obj.test_batch_encode_plus_tensors() without return types