def serialize(config):
    """Return the interpolated and serialized config."""
    output = ''
    for section in config.sections():
        output += '[' + section + ']\n'
        options = config.options(section)
        for option in options:
            output += option + ' = ' + config.get(section, option) + '\n'
        output += '\n'
    return output
