code: def _get_all_markdown_links(
      folder: tp.Union[str, Path]
  ) -> tp.List[_MarkdownLink]:
      """Returns a list of all existing markdown links"""
      pattern = re.compile(r"\[(?P<string>.+?)\]\((?P<link>\S+?)\)")
      folder = Path(folder).expanduser().absolute()
      links = []
      for rfilepath in folder.glob("**/*.md"):
          if (
              "/site-packages/"
              if os.name != "nt"
              else "\\site-packages\\"
          ) not in str(rfilepath):
              filepath = folder / rfilepath
              with filepath.open("r") as f:
                  text = f.read()
              for match in pattern.finditer(text):
                  links.append(
                      _MarkdownLink(
                          folder,
                          rfilepath,
                          match.group("string"),
                          match.group("link"),
                      )
                  )
      return links
  
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 5 for calling a global function with example usage: _get_all_markdown_links(folder) and returns: links