def dump_command_table(self, shell_ctx=None):
        """ dumps the command table """
        from azure.cli.core.commands.arm import register_global_subscription_argument, register_ids_argument
        from knack import events
        import timeit

        start_time = timeit.default_timer()
        shell_ctx = shell_ctx or self.shell_ctx
        main_loader = AzInteractiveCommandsLoader(shell_ctx.cli_ctx)

        main_loader.load_command_table(None)
        main_loader.load_arguments(None)
        register_global_subscription_argument(shell_ctx.cli_ctx)
        register_ids_argument(shell_ctx.cli_ctx)
        shell_ctx.cli_ctx.raise_event(events.EVENT_INVOKER_POST_CMD_TBL_CREATE, commands_loader=main_loader)
        cmd_table = main_loader.command_table

        cmd_table_data = {}
        for command_name, cmd in cmd_table.items():

            try:
                command_description = cmd.description
                if callable(command_description):
                    command_description = command_description()

                # checking all the parameters for a single command
                parameter_metadata = {}
                for arg in cmd.arguments.values():
                    options = {
                        'name': [name for name in arg.options_list],
                        'required': REQUIRED_TAG if arg.type.settings.get('required') else '',
                        'help': arg.type.settings.get('help') or ''
                    }
                    # the key is the first alias option
                    if arg.options_list:
                        parameter_metadata[arg.options_list[0]] = options

                cmd_table_data[command_name] = {
                    'parameters': parameter_metadata,
                    'help': command_description,
                    'examples': ''
                }
            except (ImportError, ValueError):
                pass

        load_help_files(cmd_table_data)
        elapsed = timeit.default_timer() - start_time
        logger.debug('Command table dumped: %s sec', elapsed)
        FreshTable.loader = main_loader

        # dump into the cache file
        command_file = shell_ctx.config.get_help_files()
        with open(os.path.join(get_cache_dir(shell_ctx), command_file), 'w') as help_file:
            json.dump(cmd_table_data, help_file, default=lambda x: x.target or '', skipkeys=True)
dumps the command table