code: def mock_funsd_dataset(tmpdir_factory, mock_image_stream):
      root = tmpdir_factory.mktemp("datasets")
      funsd_root = root.mkdir("funsd")
      sub_dataset_root = funsd_root.mkdir("dataset")
      train_root = sub_dataset_root.mkdir("training_data")
      image_folder = train_root.mkdir("images")
      annotations_folder = train_root.mkdir("annotations")
      labels = {
          "form": [
              {
                  "box": [84, 109, 136, 119],
                  "text": "I",
                  "label": "question",
                  "words": [{"box": [84, 109, 136, 119], "text": "I"}],
                  "linking": [[0, 37]],
                  "id": 0,
              },
              {
                  "box": [85, 110, 145, 120],
                  "text": "am",
                  "label": "answer",
                  "words": [{"box": [85, 110, 145, 120], "text": "am"}],
                  "linking": [[1, 38]],
                  "id": 1,
              },
              {
                  "box": [86, 115, 150, 125],
                  "text": "Luke",
                  "label": "answer",
                  "words": [
                      {"box": [86, 115, 150, 125], "text": "Luke"}
                  ],
                  "linking": [[2, 44]],
                  "id": 2,
              },
          ]
      }
  
      file = BytesIO(mock_image_stream)
      for i in range(3):
          fn_i = image_folder.join(f"{i}.png")
          with open(fn_i, "wb") as f:
              f.write(file.getbuffer())
          fn_l = annotations_folder.join(f"{i}.json")
          with open(fn_l, "w") as f:
              json.dump(labels, f)
  
      # Packing data into an archive to simulate the real data set and bypass archive extraction
      archive_path = root.join("funsd.zip")
      shutil.make_archive(root.join("funsd"), "zip", str(funsd_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 17 for calling a global function with example usage: mock_funsd_dataset(tmpdir_factory, mock_image_stream) and returns: str