code: def mock_pdf(tmpdir_factory):
      # Page 1
      text_img = synthesize_text_img(
          "I am a jedi!",
          background_color=(255, 255, 255),
          text_color=(0, 0, 0),
      )
      page = Image.new(text_img.mode, (1240, 1754), (255, 255, 255))
      page.paste(text_img, (50, 100))
  
      # Page 2
      text_img = synthesize_text_img(
          "No, I am your father.",
          background_color=(255, 255, 255),
          text_color=(0, 0, 0),
      )
      _page = Image.new(text_img.mode, (1240, 1754), (255, 255, 255))
      _page.paste(text_img, (40, 300))
  
      # Save the PDF
      fn = tmpdir_factory.mktemp("data").join("mock_pdf_file.pdf")
      page.save(str(fn), "PDF", save_all=True, append_images=[_page])
  
      return str(fn)
  
imports: import json
  import shutil
  import tempfile
  from io import BytesIO
  import cv2
  import hdf5storage
  import numpy
  import pytest
  import requests
  import scipy.io
  from PIL import Image
  from doctr.datasets.generator.base import synthesize_text_img
  from doctr.io import reader
  from doctr.utils import geometry
label_desc: Use image node_id 2 for calling a global function with example usage: mock_pdf(tmpdir_factory) and returns: str