code: def mock_image_path(mock_image_stream, tmpdir_factory):
      file = BytesIO(mock_image_stream)
      folder = tmpdir_factory.mktemp("images")
      fn = folder.join("mock_image_file.jpeg")
      with open(fn, "wb") as f:
          f.write(file.getbuffer())
      return str(fn)
  
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 8 for calling a global function with example usage: mock_image_path(mock_image_stream, tmpdir_factory) and returns: str