code: def mock_detection_label(tmpdir_factory):
      folder = tmpdir_factory.mktemp("labels")
      labels = {}
      for idx in range(5):
          labels[f"mock_image_file_{idx}.jpeg"] = {
              "img_dimensions": (800, 600),
              "img_hash": "dummy_hash",
              "polygons": [
                  [[1, 2], [1, 3], [2, 1], [2, 3]],
                  [[10, 20], [10, 30], [20, 10], [20, 30]],
                  [[3, 2], [3, 3], [4, 1], [4, 3]],
                  [[30, 20], [30, 30], [40, 10], [40, 30]],
              ],
          }
  
      labels_path = folder.join("labels.json")
      with open(labels_path, "w") as f:
          json.dump(labels, f)
      return str(labels_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 10 for calling a global function with example usage: mock_detection_label(tmpdir_factory) and returns: str