code: def mock_ocrdataset(tmpdir_factory, mock_image_stream):
      root = tmpdir_factory.mktemp("dataset")
      label_file = root.join("labels.json")
      label = {
          "mock_image_file_0.jpg": {
              "typed_words": [
                  {"value": "I", "geometry": (0.2, 0.2, 0.1, 0.1, 0)},
                  {"value": "am", "geometry": (0.5, 0.5, 0.1, 0.1, 0)},
              ]
          },
          "mock_image_file_1.jpg": {
              "typed_words": [
                  {"value": "a", "geometry": (0.2, 0.2, 0.1, 0.1, 0)},
                  {
                      "value": "jedi",
                      "geometry": (0.5, 0.5, 0.1, 0.1, 0),
                  },
              ]
          },
          "mock_image_file_2.jpg": {
              "typed_words": [
                  {"value": "!", "geometry": (0.2, 0.2, 0.1, 0.1, 0)},
              ]
          },
      }
      with open(label_file, "w") as f:
          json.dump(label, f)
  
      file = BytesIO(mock_image_stream)
      image_folder = tmpdir_factory.mktemp("images")
      for i in range(3):
          fn = image_folder.join(f"mock_image_file_{i}.jpg")
          with open(fn, "wb") as f:
              f.write(file.getbuffer())
  
      return str(image_folder), str(label_file)
  
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 12 for calling a global function with example usage: mock_ocrdataset(tmpdir_factory, mock_image_stream) and returns: str,  str