code: def _load_readme_description(
      path_dir: str, homepage: str, version: str
  ) -> str:
      """Load readme as decribtion.
  
      >>> _load_readme_description(_PATH_ROOT, "",  "")
      '<div align="center">...'
  
      """
      path_readme = os.path.join(path_dir, "README.md")
      with open(path_readme, encoding="utf-8") as fp:
          text = fp.read()
  
      # https://github.com/Lightning-AI/torchmetrics/raw/master/docs/source/_static/images/lightning_module/pt_to_pl.png
      github_source_url = os.path.join(homepage, "raw", version)
      # replace relative repository path to absolute link to the release
      #  do not replace all "docs" as in the readme we replace some other sources with particular path to docs
      text = text.replace(
          "docs/source/_static/",
          f"{os.path.join(github_source_url, 'docs/source/_static/')}",
      )
  
      # readthedocs badge
      text = text.replace(
          "badge/?version=stable", f"badge/?version={version}"
      )
      text = text.replace(
          "torchmetrics.readthedocs.io/en/stable/",
          f"torchmetrics.readthedocs.io/en/{version}",
      )
      # codecov badge
      text = text.replace(
          "/branch/master/graph/badge.svg",
          f"/release/{version}/graph/badge.svg",
      )
      # replace github badges for release ones
      text = text.replace(
          "badge.svg?branch=master&event=push",
          f"badge.svg?tag={version}",
      )
      # Azure...
      text = text.replace(
          "?branchName=master", f"?branchName=refs%2Ftags%2F{version}"
      )
      text = re.sub(
          r"\?definitionId=\d+&branchName=master",
          f"?definitionId=2&branchName=refs%2Ftags%2F{version}",
          text,
      )
  
      skip_begin = r"<!-- following section will be skipped from PyPI description -->"
      skip_end = r"<!-- end skipping PyPI description -->"
      # todo: wrap content as commented description
      return re.sub(
          rf"{skip_begin}.+?{skip_end}",
          "<!--  -->",
          text,
          flags=re.IGNORECASE + re.DOTALL,
      )
  
file_path: torchmetrics/setup.py
imports: import glob
  import os
  import re
  from functools import partial
  from importlib.util import module_from_spec, spec_from_file_location
  from itertools import chain
  from pathlib import Path
  from typing import Any, Iterable, Iterator, List, Optional, Tuple, Union
  from pkg_resources import Requirement, yield_lines
  from setuptools import find_packages, setup
label_desc: Use image node_id 3 for calling a global function with example usage: _load_readme_description(path_dir, homepage, version) and returns: re