code: def _replace_images_with_bokeh_plots(plots, readme):
      for plotname, plot in plots.items():
          print(f"Replace image {plotname}")
          if re.search(
              r"!\[{plotname}\]\(.+\)".format(plotname=plotname), readme
          ):
              to_replace = re.search(
                  r"!\[{plotname}\]\(.+\)".format(plotname=plotname),
                  readme,
              ).group()
              readme = readme.replace(
                  to_replace,
                  f'<div align="center">\n\n{plot}\n\n</div>',
              )
          else:
              raise KeyError(
                  f"No image with name '{plotname}' has been found in the README file."
              )
      return readme
  
file_path: Pandas-Bokeh/docs/sphinx/source/utils/create_sphinx_index_from_readme.py
imports: import argparse
  import re
  from pathlib import Path
  import click
  from make_plots import make_and_return_plots
label_desc: Use image node_id 1 for calling a global function with example usage: _replace_images_with_bokeh_plots(plots, readme) and returns: readme