code: def test_padding_to_multiple_of(self):
      tokenizers = self.get_tokenizers()
      for tokenizer in tokenizers:
          with self.subTest(f"{tokenizer.__class__.__name__}"):
              if tokenizer.pad_token is None:
                  self.skipTest("No padding token.")
              else:
                  nodes, xpaths = self.get_nodes_and_xpaths()
  
                  # empty_tokens = tokenizer([""], [[]], padding=True, pad_to_multiple_of=8)
                  normal_tokens = tokenizer(
                      nodes,
                      xpaths=xpaths,
                      padding=True,
                      pad_to_multiple_of=8,
                  )
                  # for key, value in empty_tokens.items():
                  #     self.assertEqual(len(value) % 8, 0, f"BatchEncoding.{key} is not multiple of 8")
                  for key, value in normal_tokens.items():
                      self.assertEqual(
                          len(value) % 8,
                          0,
                          f"BatchEncoding.{key} is not multiple of 8",
                      )
  
                  normal_tokens = tokenizer(
                      nodes, xpaths=xpaths, pad_to_multiple_of=8
                  )
                  for key, value in normal_tokens.items():
                      self.assertNotEqual(
                          len(value) % 8,
                          0,
                          f"BatchEncoding.{key} is not multiple of 8",
                      )
  
                  # Should also work with truncation
                  normal_tokens = tokenizer(
                      nodes,
                      xpaths=xpaths,
                      padding=True,
                      truncation=True,
                      pad_to_multiple_of=8,
                  )
                  for key, value in normal_tokens.items():
                      self.assertEqual(
                          len(value) % 8,
                          0,
                          f"BatchEncoding.{key} is not multiple of 8",
                      )
  
                  # truncation to something which is not a multiple of pad_to_multiple_of raises an error
                  self.assertRaises(
                      ValueError,
                      tokenizer.__call__,
                      nodes,
                      xpaths=xpaths,
                      padding=True,
                      truncation=True,
                      max_length=12,
                      pad_to_multiple_of=8,
                  )
  
imports: import inspect
  import json
  import os
  import re
  import shutil
  import tempfile
  import unittest
  from typing import List
  from transformers import AddedToken, MarkupLMTokenizerFast, SpecialTokensMixin, is_tf_available, is_torch_available, logging
  from transformers.models.markuplm.tokenization_markuplm import VOCAB_FILES_NAMES, MarkupLMTokenizer
  from transformers.testing_utils import is_pt_tf_cross_test, require_tokenizers, require_torch, slow
  from ...test_tokenization_common import SMALL_TRAINING_CORPUS, TokenizerTesterMixin, merge_model_tokenizer_mappings
label_desc: Use image node_id 21 for calling the MarkupLMTokenizationTest obj's underlying member method code with example usage: obj.test_padding_to_multiple_of() without return types