code: def assert_markdown_links_not_broken(
      folder: tp.Union[str, Path]
  ) -> None:
      """Asserts that all relative hyperlinks are valid in markdown files of the folder
      and its subfolders.
  
      Note
      ----
      http hyperlinks are not tested.
      """
      links = _get_all_markdown_links(folder)
      broken = [l for l in links if not l.exists()]
      if broken:
          text = "\n - ".join([str(l) for l in broken])
          raise AssertionError(f"Broken markdown links:\n - {text}")
  
imports: import re
  import os
  import warnings
  import platform
  import unittest
  import inspect
  import contextlib
  from pathlib import Path
  import typing
  import numpy
  from .None import errors
label_desc: Use image node_id 4 for calling a global function with example usage: assert_markdown_links_not_broken(folder) without return types