code: def _metadata():
      json_file = os.path.join(
          os.path.dirname(__file__), "../source/sklearn-metadata.json"
      )
      with open(json_file, "r", encoding="utf-8") as file:
          json_root = json.loads(file.read())
  
      for schema in json_root:
          name = schema["name"]
          skip_modules = [
              "lightgbm.",
              "sklearn.svm.classes",
              "sklearn.ensemble.forest.",
              "sklearn.ensemble.weight_boosting.",
              "sklearn.neural_network.multilayer_perceptron.",
              "sklearn.tree.tree.",
          ]
          if not any(
              name.startswith(module) for module in skip_modules
          ):
              class_definition = pydoc.locate(name)
              if not class_definition:
                  raise KeyError("'" + name + "' not found.")
              docstring = class_definition.__doc__
              if not docstring:
                  raise Exception(
                      "'" + name + "' missing __doc__."
                  )  # pylint: disable=broad-exception-raised
              headers = _split_docstring(docstring)
              if "" in headers:
                  _update_description(schema, headers[""])
              if "Parameters" in headers:
                  _update_attributes(schema, headers["Parameters"])
  
      with open(json_file, "w", encoding="utf-8") as file:
          file.write(json.dumps(json_root, sort_keys=False, indent=2))
  
file_path: netron/tools/sklearn_metadata.py
imports: import json
  import os
  import pydoc
  import re
label_desc: Use image node_id 6 for calling a global function with example usage: _metadata() without return types