code: def register_parser(parser, subparsers_action=None, categories=('other', ), add_help=True):
      
      name = re.sub('^dx ', '', parser.prog)
      if subparsers_action is None:
          subparsers_action = subparsers
      if isinstance(categories, basestring):
          categories = (categories, )
  
      parser_map[name] = parser
      if add_help:
          _help = subparsers_action._choices_actions[-1].help
          parser_categories['all']['cmds'].append((name, _help))
          for category in categories:
              parser_categories[category]['cmds'].append((name, _help))
docs: Attaches `parser` to the global ``parser_map``. If `add_help` is truthy,
      then adds the helpstring of `parser` into the output of ``dx help...``, for
      each category in `categories`.
  
      :param subparsers_action: A special action object that is returned by
      ``ArgumentParser.add_subparsers(...)``, or None.
      :type subparsers_action: argparse._SubParsersAction, or None.