'Run the dynamic help entry creator.'

def func(self):

    (query, cmdset) = (self.args, self.cmdset)
    caller = self.caller
    suggestion_cutoff = self.suggestion_cutoff
    suggestion_maxnum = self.suggestion_maxnum
    if (not query):
        query = 'all'
    cmdset.make_unique(caller)
    all_cmds = [cmd for cmd in cmdset if self.check_show_help(cmd, caller)]
    all_topics = [topic for topic in HelpEntry.objects.all() if topic.access(caller, 'view', default=True)]
    all_categories = list(set(([cmd.help_category.lower() for cmd in all_cmds] + [topic.help_category.lower() for topic in all_topics])))
    if (query in ('list', 'all')):
        hdict_cmd = defaultdict(list)
        hdict_topic = defaultdict(list)
        for cmd in all_cmds:
            if self.should_list_cmd(cmd, caller):
                hdict_cmd[cmd.help_category].append(cmd.key)
        [hdict_topic[topic.help_category].append(topic.key) for topic in all_topics]
        self.msg_help(self.format_help_list(hdict_cmd, hdict_topic))
        return
    suggestions = None
    if (suggestion_maxnum > 0):
        vocabulary = (([cmd.key for cmd in all_cmds if cmd] + [topic.key for topic in all_topics]) + all_categories)
        [vocabulary.extend(cmd.aliases) for cmd in all_cmds]
        suggestions = [sugg for sugg in string_suggestions(query, set(vocabulary), cutoff=suggestion_cutoff, maxnum=suggestion_maxnum) if (sugg != query)]
        if (not suggestions):
            suggestions = [sugg for sugg in vocabulary if ((sugg != query) and sugg.startswith(query))]
    match = [cmd for cmd in all_cmds if (cmd == query)]
    if (len(match) == 1):
        formatted = self.format_help_entry(match[0].key, match[0].get_help(caller, cmdset), aliases=match[0].aliases, suggested=suggestions)
        self.msg_help(formatted)
        return
    match = list(HelpEntry.objects.find_topicmatch(query, exact=True))
    if (len(match) == 1):
        formatted = self.format_help_entry(match[0].key, match[0].entrytext, aliases=match[0].aliases.all(), suggested=suggestions)
        self.msg_help(formatted)
        return
    if (query in all_categories):
        self.msg_help(self.format_help_list({query: [cmd.key for cmd in all_cmds if (cmd.help_category == query)]}, {query: [topic.key for topic in all_topics if (topic.help_category == query)]}))
        return
    self.msg(self.format_help_entry('', ("No    help    entry    found    for    '%s'" % query), None, suggested=suggestions))
