<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def generate_help(config_cls, **kwargs):
 """ Autogenerate a help string for a config class. If a callable is provided via the "formatter" kwarg it will be provided with the help dictionaries as an argument and any other kwargs provided to this function. That callable should return the help text string. """

    try:
        formatter = kwargs.pop("formatter")
    except KeyError:
        formatter = _format_help_dicts
    help_dicts = _generate_help_dicts(config_cls)
    return formatter(help_dicts, **kwargs)