code: def disable_plot_gallery_for_linkcheck(app):
      if app.builder.name == "linkcheck":
          sphinx_gallery_conf["plot_gallery"] = "False"
  
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 7 for calling a global function with example usage: disable_plot_gallery_for_linkcheck(app) without return types