code: def main(args):
      logging.basicConfig(
          level=logging.INFO if args.verbose else logging.WARNING
      )
  
      with open(args.config, "r") as f:
          config = yaml.safe_load(f)
  
      for page in config["api-reference"]:
          filename = next(iter(page))
          name, apis = (
              page[filename][0]["name"],
              page[filename][1]["content"],
          )
          content = []
          logging.info("Creating `{0}`...".format(filename))
  
          for api in apis:
              module_name = next(iter(api))
              module = importlib.import_module(module_name)
              class_names = api[module_name]
  
              if (len(class_names) == 1) and (
                  class_names[0] == "__all__"
              ):
                  class_names = getattr(module, "__all__")
                  if class_names is None:
                      continue
  
              for class_name in class_names:
                  kls = getattr(module, class_name)
                  if getattr(kls, "__doc__") is None:
                      continue
                  logging.info(
                      "  {0}.{1}".format(module_name, class_name)
                  )
                  content.append(format_docs(module, kls))
  
          with open(filename, "w") as f:
              f.write("\n\n".join(content))
  
file_path: pytorch-meta/docs/scripts/api_reference.py
imports: import importlib
  import inspect
  import re
  import yaml
  import logging
  import torch.nn
label_desc: Use image node_id 8 for calling a global function with example usage: main(args) without return types