code: def _test_kiepredictor(predictor):
      # Output checks
      assert isinstance(predictor, KIEPredictor)
  
      doc = [np.zeros((512, 512, 3), dtype=np.uint8)]
      out = predictor(doc)
      # Document
      assert isinstance(out, KIEDocument)
  
      # The input doc has 1 page
      assert len(out.pages) == 1
      # Dimension check
      with pytest.raises(ValueError):
          input_page = (255 * np.random.rand(1, 256, 512, 3)).astype(
              np.uint8
          )
          _ = predictor([input_page])
  
imports: import numpy
  import pytest
  from torch import nn
  from doctr import models
  from doctr.file_utils import CLASS_NAME
  from doctr.io import Document, DocumentFile
  from doctr.io.elements import KIEDocument
  from doctr.models import detection, recognition
  from doctr.models.detection.predictor import DetectionPredictor
  from doctr.models.detection.zoo import detection_predictor
  from doctr.models.kie_predictor import KIEPredictor
  from doctr.models.predictor import OCRPredictor
  from doctr.models.preprocessor import PreProcessor
  from doctr.models.recognition.predictor import RecognitionPredictor
  from doctr.models.recognition.zoo import recognition_predictor
label_desc: Use image node_id 6 for calling a global function with example usage: _test_kiepredictor(predictor) without return types