code: def _replace_relative_links(regex: tp.Match[str]) -> str:
      """Converts relative links into links to version
      so that links on Pypi long description are correct
      """
      string = regex.group()
      link = regex.group("link")
      name = regex.group("name")
      if not link.startswith("http") and Path(link).exists():
          githuburl = (
              f"github.com/facebookresearch/nevergrad/blob/{version}"
              if not link.endswith((".png", ".gif"))
              else f"raw.githubusercontent.com/facebookresearch/nevergrad/{version}"
          )
          string = f"[{name}](https://{githuburl}/{link})"
      return string
  
file_path: nevergrad/setup.py
imports: import re
  import os
  import sys
  import typing
  from pathlib import Path
  from setuptools import setup
  from setuptools import find_packages
  from setuptools.command.install import install
label_desc: Use image node_id 1 for calling a global function with example usage: _replace_relative_links(regex) and returns: string