code: def get_test_pipeline(self, model, tokenizer, feature_extractor):
      dqa_pipeline = pipeline(
          "document-question-answering",
          model=model,
          tokenizer=tokenizer,
          feature_extractor=feature_extractor,
      )
  
      image = INVOICE_URL
      word_boxes = list(
          zip(*apply_tesseract(load_image(image), None, ""))
      )
      question = "What is the placebo?"
      examples = [
          {
              "image": load_image(image),
              "question": question,
          },
          {
              "image": image,
              "question": question,
          },
          {
              "image": image,
              "question": question,
              "word_boxes": word_boxes,
          },
          {
              "image": None,
              "question": question,
              "word_boxes": word_boxes,
          },
      ]
      return dqa_pipeline, examples
  
file_path: H2O/h2o_flexgen/benchmark/third_party/transformers/tests/pipelines/test_pipelines_document_question_answering.py
imports: import unittest
  from transformers import MODEL_FOR_DOCUMENT_QUESTION_ANSWERING_MAPPING, AutoTokenizer, is_vision_available
  from transformers.pipelines import pipeline
  from transformers.pipelines.document_question_answering import apply_tesseract
  from transformers.testing_utils import nested_simplify, require_detectron2, require_pytesseract, require_tf, require_torch, require_vision, slow
  from .test_pipelines_common import ANY, PipelineTestCaseMeta
label_desc: Use image node_id 1 for calling the DocumentQuestionAnsweringPipelineTests obj's underlying member method code with example usage: obj.get_test_pipeline(model, tokenizer, feature_extractor) and returns: dqa_pipeline,  examples