In Python 2.x you can't alter the __doc__ of a class after you define it,
    so we need to provide a function that does the munging when we define each
    class. This is that function.

def makecfgdoc(taskname, doc):
    """In Python 2.x you can't alter the __doc__ of a class after you define it,
    so we need to provide a function that does the munging when we define each
    class. This is that function.

    """
    doc_args = dict(
        bulk = '\n'.join(l for l in doc.splitlines() if not l.startswith ('casatask ')),
        taskname = taskname
    )

    return _kwcli_cfg_class_doc_template % doc_args