docstr: When calling batch_encode with multiple sequences, it can return different number of
  overflowing encoding for each sequence:
  [
    Sequence 1: [Encoding 1, Encoding 2],
    Sequence 2: [Encoding 1],
    Sequence 3: [Encoding 1, Encoding 2, ... Encoding N]
  ]
  This needs to be padded so that it can represented as a tensor
docstr_tok: ["When","calling","batch_encode","with","multiple","sequences",",","it","can","return","different","number","of","overflowing","encoding","for","each","sequence",":","[","Sequence","1",":","[","Encoding","1",",","Encoding","2","]",",","Sequence","2",":","[","Encoding","1","]",",","Sequence","3",":","[","Encoding","1",",","Encoding","2",",","...","Encoding","N","]","]","This","needs","to","be","padded","so","that","it","can","represented","as","a","tensor"]
code: def test_batch_encode_dynamic_overflowing(self):
      """
      When calling batch_encode with multiple sequences, it can return different number of
      overflowing encoding for each sequence:
      [
        Sequence 1: [Encoding 1, Encoding 2],
        Sequence 2: [Encoding 1],
        Sequence 3: [Encoding 1, Encoding 2, ... Encoding N]
      ]
      This needs to be padded so that it can represented as a tensor
      """
      for tokenizer, pretrained_name, kwargs in self.tokenizers_list:
          tokenizer = self.rust_tokenizer_class.from_pretrained(
              pretrained_name, **kwargs
          )
  
          with self.subTest(
              f"{tokenizer.__class__.__name__} ({pretrained_name}, {tokenizer.__class__.__name__})"
          ):
              if is_torch_available():
                  returned_tensor = "pt"
              elif is_tf_available():
                  returned_tensor = "tf"
              else:
                  returned_tensor = "jax"
  
              # Single example
              words, boxes = self.get_words_and_boxes()
              tokens = tokenizer.encode_plus(
                  words,
                  boxes=boxes,
                  max_length=6,
                  padding=True,
                  truncation=True,
                  return_tensors=returned_tensor,
                  return_overflowing_tokens=True,
              )
  
              for key in filter(
                  lambda x: "overflow_to_sample_mapping" not in x,
                  tokens.keys(),
              ):
                  if key != "bbox":
                      self.assertEqual(len(tokens[key].shape), 2)
                  else:
                      self.assertEqual(len(tokens[key].shape), 3)
  
              # Batch of examples
              # For these 2 examples, 3 training examples will be created
              words, boxes = self.get_words_and_boxes_batch()
              tokens = tokenizer.batch_encode_plus(
                  words,
                  boxes=boxes,
                  max_length=6,
                  padding=True,
                  truncation="only_first",
                  return_tensors=returned_tensor,
                  return_overflowing_tokens=True,
              )
  
              for key in filter(
                  lambda x: "overflow_to_sample_mapping" not in x,
                  tokens.keys(),
              ):
                  if key != "bbox":
                      self.assertEqual(len(tokens[key].shape), 2)
                      self.assertEqual(tokens[key].shape[-1], 6)
                  else:
                      self.assertEqual(len(tokens[key].shape), 3)
                      self.assertEqual(tokens[key].shape[-1], 4)
  
imports: import inspect
  import shutil
  import tempfile
  import unittest
  from typing import List
  from transformers import AddedToken, LayoutXLMTokenizerFast, SpecialTokensMixin, is_tf_available, is_torch_available, logging
  from transformers.models.layoutxlm.tokenization_layoutxlm import LayoutXLMTokenizer
  from transformers.testing_utils import get_tests_dir, is_pt_tf_cross_test, require_pandas, require_scatter, require_sentencepiece, require_tokenizers, require_torch, slow
  from ...test_tokenization_common import SMALL_TRAINING_CORPUS, TokenizerTesterMixin, filter_non_english, merge_model_tokenizer_mappings
label_desc: Use image node_id 47 for calling the LayoutXLMTokenizationTest obj's underlying member method code with example usage: obj.test_batch_encode_dynamic_overflowing() without return types