code: def generate_min_dependency_substitutions(app):
      """Generate min dependency substitutions for docs."""
      from sklearn._min_dependencies import dependent_packages
  
      output = StringIO()
  
      for package, (version, _) in dependent_packages.items():
          package = package.capitalize()
          output.write(f".. |{package}MinVersion| replace:: {version}")
          output.write("\n")
  
      output = output.getvalue()
  
      with (Path(".") / "min_dependency_substitutions.rst").open(
          "w"
      ) as f:
          f.write(output)
  
file_path: imbalanced-learn/doc/conf.py
imports: import os
  import sys
  from datetime import datetime
  from io import StringIO
  from pathlib import Path
  from github_link import make_linkcode_resolve
  from imblearn import __version__
label_desc: Use image node_id 2 for calling a global function with example usage: generate_min_dependency_substitutions(app) without return types