code: def _make_argparse_table(class_):
      """
      Build the reStructuredText table containing the args and descriptions.
      """
      readme = []
      parser = ParlaiParser(False, False)
      class_.add_cmdline_args(parser, partial_opt=None)
      # group by whatever ArgumentGroups there are
      for ag in parser._action_groups:
          actions = []
          # get options defined within only this group
          for action in ag._group_actions:
              if hasattr(action, "hidden") and action.hidden:
                  # some options are marked hidden
                  continue
              if (
                  action.dest == argparse.SUPPRESS
                  or action.dest == "help"
              ):
                  continue
              action_strings = ",  ".join(
                  f"`{a}`" for a in action.option_strings
              )
              description = []
              if action.help:
                  h = action.help
                  if not h[0].isupper():
                      h = h[0].upper() + h[1:]
                  h = h.replace("%(default)s", str(action.default))
                  description += [h]
              # list choices if there are any
              if action.choices:
                  description += [
                      "Choices: "
                      + ", ".join(f"`{c}`" for c in action.choices)
                      + "."
                  ]
              # list default and recommended values.
              default_value = ""
              if (
                  action.default is not None
                  and action.default is not 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)
  
              description = "\n".join(description)
              # escape for the fact that we're inserting this inside a table
              description = description.replace("\n", "\n   \n   ")
              actions.append((action_strings, description))
  
          if not actions:
              continue
  
          readme.append(f"__{ag.title.title()}__\n\n")
          readme.append("| Argument | Description |\n")
          readme.append("|----------|----------|\n")
          for row in actions:
              text = "| " + " | ".join(row) + " |"
              text = text.replace("\n", "<br>")
              readme.append(f"{text}\n")
          readme.append("\n\n")
      return readme
  
file_path: ParlAI/docs/source/generate_mutator_list.py
imports: import textwrap
  import argparse
  from parlai.core.params import ParlaiParser
  from parlai.core.mutators import setup_mutator_registry
  from parlai.utils.testing import capture_output
  import parlai.utils.logging
  from parlai.scripts.display_data import DisplayData
label_desc: Use image node_id 1 for calling a global function with example usage: _make_argparse_table(class_) and returns: readme