code: def mock_synthtext_dataset(tmpdir_factory, mock_image_stream):
      root = tmpdir_factory.mktemp("datasets")
      synthtext_root = root.mkdir("SynthText")
      image_folder = synthtext_root.mkdir("8")
      annotation_file = synthtext_root.join("gt.mat")
      labels = {
          "imnames": [
              [
                  ["8/ballet_106_0.jpg"],
                  ["8/ballet_106_1.jpg"],
                  ["8/ballet_106_2.jpg"],
              ]
          ],
          "wordBB": [
              [
                  np.random.randint(1000, size=(2, 4, 5))
                  for _ in range(3)
              ]
          ],
          "txt": [
              np.array(
                  [
                      ["I      ", "am\na      ", "Jedi   ", "!"]
                      for _ in range(3)
                  ]
              )
          ],
      }
      # hacky trick to write file into a LocalPath object with scipy.io.savemat
      with tempfile.NamedTemporaryFile(mode="wb", delete=True) as f:
          sio.savemat(f.name, labels)
          shutil.copy(f.name, str(annotation_file))
  
      file = BytesIO(mock_image_stream)
      for i in range(3):
          fn_i = image_folder.join(f"ballet_106_{i}.jpg")
          with open(fn_i, "wb") as f:
              f.write(file.getbuffer())
  
      # Packing data into an archive to simulate the real data set and bypass archive extraction
      archive_path = root.join("SynthText.zip")
      shutil.make_archive(
          root.join("SynthText"), "zip", str(synthtext_root)
      )
      return str(archive_path)
  
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 19 for calling a global function with example usage: mock_synthtext_dataset(tmpdir_factory, mock_image_stream) and returns: str