code: def render_script(fout, key, registration):
      script_parser = registration.klass.setup_args()
      description = script_parser.description
      fout.write(f"## {key}\n\n")
      if description:
          fout.write(f"__Short description:__ {description}\n\n")
      if registration.aliases:
          aliases = ", ".join(f"`{a}`" for a in registration.aliases)
          fout.write(f"__Aliases:__ {aliases}\n")
  
      mod = importlib.import_module(registration.klass.__module__)
      doc = inspect.getdoc(mod)
      if doc:
          doc = doc.replace("## Examples", "### Examples")
          fout.write(doc)
          fout.write("\n")
  
      actions = []
      for action in script_parser._actions:
          if hasattr(action, "hidden") and action.hidden:
              # some options are marked hidden
              continue
          if action.dest == argparse.SUPPRESS:
              continue
          if action.dest == "help" or action.dest == "helpall":
              continue
          action_strings = ",  ".join(
              f"`{a}`" for a in action.option_strings
          )
          if not action_strings:
              continue
          description = []
          if action.help:
              h = action.help
              if not h[0].isupper():
                  h = h[0].upper() + h[1:]
              h = h.replace("%(default)s", f"`{action.default}`")
              description += [h]
          # list choices if there are any
          if action.choices:
              description += [
                  "Choices: "
                  + ", ".join(f"`{c}`" for c in action.choices)
              ]
          default_value = ""
          if action.default and action.default != argparse.SUPPRESS:
              default_value += f"Default: `{action.default}`.  "
          if hasattr(action, "recommended") and action.recommended:
              default_value += f"Recommended: `{action.recommended}`. "
  
          # special escape for a few args which use a literal newline as their default
          if default_value:
              default_value = default_value.replace("\n", "\\n")
              description.append(default_value)
  
          # escape for the fact that we're inserting this inside a table
          description = " <BR> ".join(description)
          actions.append((action_strings, description))
  
      if not actions:
          return
  
      fout.write("### CLI Arguments\n\n")
      fout.write("| Argument | Description |\n")
      fout.write("| ------- | --------- |\n")
      for action, description in actions:
          fout.write(f"| {action} | {description} |\n")
      fout.write("\n\n")
  
imports: import importlib
  import inspect
  import argparse
  import parlai.core.script
label_desc: Use image node_id 1 for calling a global function with example usage: render_script(fout, key, registration) without return types