code: def _replace_relative_links(regex: tp.Match[str]) -> str:
      """Converts relative links into links to master
      so that links on Pypi long description are correct
      """
      string: str = regex.group()
      link = regex.group("link")
      name = regex.group("name")
      version = submitit.__version__
      if not link.startswith("http") and Path(link).exists():
          github_url = (
              f"github.com/facebookincubator/submitit/blob/{version}"
          )
          string = f"[{name}](https://{github_url}/{link})"
      return string
  
file_path: submitit/submitit/test_documentation.py
imports: import re
  import typing
  from pathlib import Path
  import submitit
label_desc: Use image node_id 5 for calling a global function with example usage: _replace_relative_links(regex) and returns: string