code: def prepare(app):
      with open(DIR.parent / "README.rst") as f:
          contents = f.read()
  
      if app.builder.name == "latex":
          # Remove badges and stuff from start
          contents = contents[contents.find(r".. start") :]
  
          # Filter out section titles for index.rst for LaTeX
          contents = re.sub(
              r"^(.*)\n[-~]{3,}$",
              r"**\1**",
              contents,
              flags=re.MULTILINE,
          )
  
      with open(DIR / "readme.rst", "w") as f:
          f.write(contents)
  
file_path: coremltools/deps/pybind11/docs/conf.py
imports: import os
  import re
  import subprocess
  import sys
  from pathlib import Path
label_desc: Use image node_id 2 for calling a global function with example usage: prepare(app) without return types