code: def _set_root_image_path(page_path: str):
      """Set relative path to be from the root, drop all `../` in images used gallery."""
      with open(page_path, encoding="UTF-8") as fopen:
          body = fopen.read()
      found = re.findall(r"   :image: (.*)\.svg", body)
      for occur in found:
          occur_ = occur.replace("../", "")
          body = body.replace(occur, occur_)
      with open(page_path, "w", encoding="UTF-8") as fopen:
          fopen.write(body)
  
file_path: torchmetrics/docs/source/conf.py
imports: import glob
  import inspect
  import os
  import re
  import shutil
  import sys
  import lai_sphinx_theme
  from lightning_utilities.docs import fetch_external_assets
  from lightning_utilities.docs.formatting import _transform_changelog
  import torchmetrics
label_desc: Use image node_id 1 for calling a global function with example usage: _set_root_image_path(page_path) without return types