code: def check_pypi_repository_in_provider_tocs() -> list[DocBuildError]:
      """Checks that each documentation for provider packages has a link to PyPI files in the TOC."""
      build_errors = []
      for provider in ALL_PROVIDER_YAMLS:
          doc_file_path = (
              f"{DOCS_DIR}/{provider['package-name']}/index.rst"
          )
          expected_text = f"PyPI Repository <https://pypi.org/project/{provider['package-name']}/>"
          build_error = assert_file_contains(
              file_path=doc_file_path,
              pattern=re.escape(expected_text),
              message=(
                  f"A link to the PyPI in table of contents is missing. Can you please add it?\n\n"
                  f"    {expected_text}"
              ),
          )
          if build_error:
              build_errors.append(build_error)
  
      return build_errors
  
imports: from __future__ import annotations
  import ast
  import itertools
  import os
  import re
  from glob import glob
  from typing import Iterable
  from docs.exts.docs_build.docs_builder import ALL_PROVIDER_YAMLS
  from docs.exts.docs_build.errors import DocBuildError
label_desc: Use image node_id 14 for calling a global function with example usage: check_pypi_repository_in_provider_tocs() and returns: build_errors