<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def cfg2dict(cfg):
 """turn a ConfigParser into a nested dict because ConfigParser objects are dumb. """

    d = {}
    for section in cfg.sections():
        d[section] = dict(cfg.items(section))
    return d