code: def setup(app):
      # do not run the examples when using linkcheck by using a small priority
      # (default priority is 500 and sphinx-gallery using builder-inited event too)
      app.connect(
          "builder-inited",
          disable_plot_gallery_for_linkcheck,
          priority=50,
      )
      app.connect("builder-inited", generate_min_dependency_table)
      app.connect(
          "builder-inited", generate_min_dependency_substitutions
      )
  
      # to hide/show the prompt in code examples:
      app.connect("build-finished", make_carousel_thumbs)
      app.connect("build-finished", filter_search_index)
  
imports: import os
  import re
  import sys
  import warnings
  from datetime import datetime
  from io import StringIO
  from pathlib import Path
  from sklearn.externals._packaging.version import parse
  import sphinx_gallery
  from github_link import make_linkcode_resolve
  from sphinx_gallery.notebook import add_code_cell, add_markdown_cell
  from sphinx_gallery.sorting import ExampleTitleSortKey
  import sklearn
  from sklearn.experimental import enable_iterative_imputer
  from sklearn.experimental import enable_halving_search_cv
  from sklearn.utils.fixes import VisibleDeprecationWarning
label_desc: Use image node_id 8 for calling a global function with example usage: setup(app) without return types