code: def gen_models_docs(modules):
      yield ".. This file is autogenerated from gen_python.py, DO NOT MODIFY"
      yield ""
      yield ":tocdepth: 3"
      yield ""
      yield "Modeling In H2O"
      yield "==============="
      modules_with_globals = ["automl"]
      for cat in ["Supervised", "Unsupervised", "Miscellaneous"]:
          yield ""
          yield cat
          yield "+" * len(cat)
          yield ""
          for full_module, module, clz, category in sorted(modules):
              if category != cat:
                  continue
              # doc for module
              if module in modules_with_globals:
                  yield ":mod:`%s`" % module
                  yield "-" * (7 + len(module))
                  yield ".. automodule:: %s" % full_module
                  yield "    :members:"
                  yield "    :exclude-members: %s" % clz
                  yield ""
              # doc for class
              full_clz = ".".join([full_module, clz])
              yield ":mod:`%s`" % clz
              yield "-" * (7 + len(clz))
              yield ".. autoclass:: %s" % full_clz
              yield "    :show-inheritance:"
              yield "    :members:"
              yield ""
  
imports: from copy import deepcopy
  from functools import partial
  from io import StringIO
  from inspect import getsource
  from pprint import pformat
  import sys
  import bindings
  from custom import get_customizations_for, reformat_block
label_desc: Use image node_id 10 for calling a global function with example usage: gen_models_docs(modules) without return types