code: def mock_imgur5k(tmpdir_factory, mock_image_stream):
      file = BytesIO(mock_image_stream)
      image_folder = tmpdir_factory.mktemp("images")
      label_folder = tmpdir_factory.mktemp("dataset_info")
      labels = {
          "index_id": {
              "YsaVkzl": {
                  "image_url": "https://i.imgur.com/YsaVkzl.jpg",
                  "image_path": "/path/to/IMGUR5K-Handwriting-Dataset/images/YsaVkzl.jpg",
                  "image_hash": "993a7cbb04a7c854d1d841b065948369",
              },
              "wz3wHhN": {
                  "image_url": "https://i.imgur.com/wz3wHhN.jpg",
                  "image_path": "/path/to/IMGUR5K-Handwriting-Dataset/images/wz3wHhN.jpg",
                  "image_hash": "9157426a98ee52f3e1e8d41fa3a99175",
              },
              "BRHSP23": {
                  "image_url": "https://i.imgur.com/BRHSP23.jpg",
                  "image_path": "/path/to/IMGUR5K-Handwriting-Dataset/images/BRHSP23.jpg",
                  "image_hash": "aab01f7ac82ae53845b01674e9e34167",
              },
          },
          "index_to_ann_map": {
              "YsaVkzl": ["YsaVkzl_0", "YsaVkzl_1"],
              "wz3wHhN": ["wz3wHhN_0", "wz3wHhN_1"],
              "BRHSP23": ["BRHSP23_0", "BRHSP23_1"],
          },
          "ann_id": {
              "YsaVkzl_0": {
                  "word": "I",
                  "bounding_box": "[305.33, 850.67, 432.33, 115.33, 5.0]",
              },
              "YsaVkzl_1": {
                  "word": "am",
                  "bounding_box": "[546.67, 455.67, 345.0, 212.33, 18.67]",
              },
              "wz3wHhN_0": {
                  "word": "a",
                  "bounding_box": "[544.67, 345.67, 76.0, 222.33, 34.67]",
              },
              "wz3wHhN_1": {
                  "word": "jedi",
                  "bounding_box": "[545.0, 437.0, 76.67, 201.0, 23.33]",
              },
              "BRHSP23_0": {
                  "word": "!",
                  "bounding_box": "[555.67, 432.67, 220.0, 120.33, 7.67]",
              },
              "BRHSP23_1": {
                  "word": "!",
                  "bounding_box": "[566.0, 437.0, 76.67, 201.0, 25.33]",
              },
          },
      }
      label_file = label_folder.join("imgur5k_annotations.json")
      with open(label_file, "w") as f:
          json.dump(labels, f)
      for index_id in ["YsaVkzl", "wz3wHhN", "BRHSP23"]:
          fn_i = image_folder.join(f"{index_id}.jpg")
          with open(fn_i, "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 14 for calling a global function with example usage: mock_imgur5k(tmpdir_factory, mock_image_stream) and returns: str,  str