code: def mock_doc_artefacts(tmpdir_factory, mock_image_stream):
      root = tmpdir_factory.mktemp("datasets")
      doc_root = root.mkdir("artefact_detection")
      labels = {
          "0.jpg": [
              {
                  "geometry": [
                      0.94375,
                      0.4013671875,
                      0.99375,
                      0.4365234375,
                  ],
                  "label": "bar_code",
              },
              {
                  "geometry": [
                      0.03125,
                      0.6923828125,
                      0.07875,
                      0.7294921875,
                  ],
                  "label": "qr_code",
              },
              {
                  "geometry": [
                      0.1975,
                      0.1748046875,
                      0.39875,
                      0.2216796875,
                  ],
                  "label": "bar_code",
              },
          ],
          "1.jpg": [
              {
                  "geometry": [
                      0.94375,
                      0.4013671875,
                      0.99375,
                      0.4365234375,
                  ],
                  "label": "bar_code",
              },
              {
                  "geometry": [
                      0.03125,
                      0.6923828125,
                      0.07875,
                      0.7294921875,
                  ],
                  "label": "qr_code",
              },
              {
                  "geometry": [
                      0.1975,
                      0.1748046875,
                      0.39875,
                      0.2216796875,
                  ],
                  "label": "background",
              },
          ],
          "2.jpg": [
              {
                  "geometry": [
                      0.94375,
                      0.4013671875,
                      0.99375,
                      0.4365234375,
                  ],
                  "label": "logo",
              },
              {
                  "geometry": [
                      0.03125,
                      0.6923828125,
                      0.07875,
                      0.7294921875,
                  ],
                  "label": "qr_code",
              },
              {
                  "geometry": [
                      0.1975,
                      0.1748046875,
                      0.39875,
                      0.2216796875,
                  ],
                  "label": "photo",
              },
          ],
      }
      train_root = doc_root.mkdir("train")
      label_file = train_root.join("labels.json")
  
      with open(label_file, "w") as f:
          json.dump(labels, f)
  
      image_folder = train_root.mkdir("images")
      file = BytesIO(mock_image_stream)
      for i in range(3):
          fn = image_folder.join(f"{i}.jpg")
          with open(fn, "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("artefact_detection.zip")
      shutil.make_archive(
          root.join("artefact_detection"), "zip", str(doc_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 20 for calling a global function with example usage: mock_doc_artefacts(tmpdir_factory, mock_image_stream) and returns: str