def _maybe_quote(val):
    '''All of our values should be strings. Usually those can be passed in as
    bare words, but if they're parseable as an int or float we need to quote
    them.'''
    assert isinstance(val, str), 'We should never set non-string values.'
    needs_quoting = False
    try:
        int(val)
        needs_quoting = True
    except Exception:
        pass
    try:
        float(val)
        needs_quoting = True
    except Exception:
        pass
    if needs_quoting:
        return '"{}"'.format(val)
    else:
        return val
All of our values should be strings. Usually those can be passed in as
    bare words, but if they're parseable as an int or float we need to quote
    them.