class_docstr: Constructs a LayoutLMv3 processor which combines a LayoutLMv3 image processor and a LayoutLMv3 tokenizer into a
  single processor.
  
  [`LayoutLMv3Processor`] offers all the functionalities you need to prepare data for the model.
  
  It first uses [`LayoutLMv3ImageProcessor`] to resize and normalize document images, and optionally applies OCR to
  get words and normalized bounding boxes. These are then provided to [`LayoutLMv3Tokenizer`] or
  [`LayoutLMv3TokenizerFast`], which turns the words and bounding boxes into token-level `input_ids`,
  `attention_mask`, `token_type_ids`, `bbox`. Optionally, one can provide integer `word_labels`, which are turned
  into token-level `labels` for token classification tasks (such as FUNSD, CORD).
  
  Args:
      image_processor (`LayoutLMv3ImageProcessor`, *optional*):
          An instance of [`LayoutLMv3ImageProcessor`]. The image processor is a required input.
      tokenizer (`LayoutLMv3Tokenizer` or `LayoutLMv3TokenizerFast`, *optional*):
          An instance of [`LayoutLMv3Tokenizer`] or [`LayoutLMv3TokenizerFast`]. The tokenizer is a required input.
class_docstr_tok: ["Constructs","a","LayoutLMv3","processor","which","combines","a","LayoutLMv3","image","processor","and","a","LayoutLMv3","tokenizer","into","a","single","processor",".","[","`","LayoutLMv3Processor","`","]","offers","all","the","functionalities","you","need","to","prepare","data","for","the","model",".","It","first","uses","[","`","LayoutLMv3ImageProcessor","`","]","to","resize","and","normalize","document","images",",","and","optionally","applies","OCR","to","get","words","and","normalized","bounding","boxes",".","These","are","then","provided","to","[","`","LayoutLMv3Tokenizer","`","]","or","[","`","LayoutLMv3TokenizerFast","`","]",",","which","turns","the","words","and","bounding","boxes","into","token-level","`","input_ids","`",",","`","attention_mask","`",",","`","token_type_ids","`",",","`","bbox","`",".","Optionally",",","one","can","provide","integer","`","word_labels","`",",","which","are","turned","into","token-level","`","labels","`","for","token","classification","tasks","(","such","as","FUNSD",",","CORD",")",".","Args",":","image_processor","(","`","LayoutLMv3ImageProcessor","`",",","*","optional","*",")",":","An","instance","of","[","`","LayoutLMv3ImageProcessor","`","]",".","The","image","processor","is","a","required","input",".","tokenizer","(","`","LayoutLMv3Tokenizer","`","or","`","LayoutLMv3TokenizerFast","`",",","*","optional","*",")",":","An","instance","of","[","`","LayoutLMv3Tokenizer","`","]","or","[","`","LayoutLMv3TokenizerFast","`","]",".","The","tokenizer","is","a","required","input","."]
code: def get_overflowing_images(self, images, overflow_to_sample_mapping):
      # in case there's an overflow, ensure each `input_ids` sample is mapped to its corresponding image
      images_with_overflow = []
      for sample_idx in overflow_to_sample_mapping:
          images_with_overflow.append(images[sample_idx])
  
      if len(images_with_overflow) != len(overflow_to_sample_mapping):
          raise ValueError(
              "Expected length of images to be the same as the length of `overflow_to_sample_mapping`, but got"
              f" {len(images_with_overflow)} and {len(overflow_to_sample_mapping)}"
          )
  
      return images_with_overflow
  
file_path: transformers/src/transformers/models/layoutlmv3/processing_layoutlmv3.py
imports: import warnings
  from typing import List, Optional, Union
  from ...processing_utils import ProcessorMixin
  from ...tokenization_utils_base import BatchEncoding, PaddingStrategy, PreTokenizedInput, TextInput, TruncationStrategy
  from ...utils import TensorType
label_desc: Use image node_id 3 for calling the LayoutLMv3Processor obj's underlying member method code with example usage: obj.get_overflowing_images(images, overflow_to_sample_mapping) and returns: images_with_overflow