code: def make_carousel_thumbs(app, exception):
      """produces the final resized carousel images"""
      if exception is not None:
          return
      print("Preparing carousel images")
  
      image_dir = os.path.join(app.builder.outdir, "_images")
      for glr_plot, max_width in carousel_thumbs.items():
          image = os.path.join(image_dir, glr_plot)
          if os.path.exists(image):
              c_thumb = os.path.join(
                  image_dir, glr_plot[:-4] + "_carousel.png"
              )
              sphinx_gallery.gen_rst.scale_image(
                  image, c_thumb, max_width, 190
              )
  
file_path: scikit-optimize/doc/conf.py
imports: import warnings
  import os
  import re
  from packaging.version import parse
  import sys
  import skopt
  from github_link import make_linkcode_resolve
  import sphinx_gallery
label_desc: Use image node_id 1 for calling a global function with example usage: make_carousel_thumbs(app, exception) without return types