code: def figure_rst(figure_list, sources_dir):
      """Generate RST for a list of image filenames.
      Depending on whether we have one or more figures, we use a
      single rst call to 'image' or a horizontal list.
  
      Original functions:
          from sphinx_gallery.gen_rst import figure_rst
          from plotly.io._sg_scraper import figure_rst
      Modified rST directives from image to raw html
  
      Parameters
      ----------
      figure_list : list
          List of strings of the figures' absolute paths.
      sources_dir : str
          absolute path of Sphinx documentation sources
      Returns
      -------
      images_rst : str
          rst code to embed the images in the document
      """
      # figure_paths = [os.path.relpath(figure_path, sources_dir)
      #                 .replace(os.sep, '/').lstrip('/')
      #                 for figure_path in figure_list]
      figure_paths = figure_list
      images_rst = ""
      if len(figure_paths) == 1:
          figure_name = figure_paths[0]
          images_rst = SINGLE_HTML % figure_name
      elif len(figure_paths) > 1:
          images_rst = HLIST_HEADER
          for figure_name in figure_paths:
              images_rst += HLIST_HTML_TEMPLATE % figure_name
  
      return images_rst
  
file_path: greykite/greykite/common/sphinx_plotly.py
imports: import inspect
  import os
  import shutil
  import warnings
  from glob import glob
  from pathlib import Path
  import plotly
  from plotly.io import write_html
  from plotly.io import write_image
  from plotly.io._base_renderers import ExternalRenderer
  from plotly.tools import return_figure_from_figure_or_data
label_desc: Use image node_id 2 for calling a global function with example usage: figure_rst(figure_list, sources_dir) and returns: images_rst