Render a dict based on a format

def pretty_render(data, format='text', indent=0):
    """
    Render a dict based on a format
    """
    if format == 'json':
        return render_json(data)
    elif format == 'html':
        return render_html(data)
    elif format == 'xml':
        return render_xml(data)
    else:
        return dict_to_plaintext(data, indent=indent)