class_docstr: Constructs a TrOCR processor which wraps a vision feature extractor and a TrOCR tokenizer into a single processor.
  
  [`TrOCRProcessor`] offers all the functionalities of [`ViTFeatureExtractor`/`DeiTFeatureExtractor`] and
  [`RobertaTokenizer`/`XLMRobertaTokenizer`]. See the [`~TrOCRProcessor.__call__`] and [`~TrOCRProcessor.decode`] for
  more information.
  
  Args:
      feature_extractor ([`ViTFeatureExtractor`/`DeiTFeatureExtractor`]):
          An instance of [`ViTFeatureExtractor`/`DeiTFeatureExtractor`]. The feature extractor is a required input.
      tokenizer ([`RobertaTokenizer`/`XLMRobertaTokenizer`]):
          An instance of [`RobertaTokenizer`/`XLMRobertaTokenizer`]. The tokenizer is a required input.
code: def __init__(self, feature_extractor, tokenizer):
      super().__init__(feature_extractor, tokenizer)
      self.current_processor = self.feature_extractor
      self._in_target_context_manager = False
  
file_path: H2O/h2o_flexgen/benchmark/third_party/transformers/src/transformers/models/trocr/processing_trocr.py
imports: import warnings
  from contextlib import contextmanager
  from ...processing_utils import ProcessorMixin
label_desc: Use image node_id 1 to create a new TrOCRProcessor object from inherited base classes: ProcessorMixin with example: obj = TrOCRProcessor(feature_extractor, tokenizer)