def decode_value(s):
    if len(s) > 1 and s[0] in ('"', "'"):
        if s[0] != s[-1]:
            raise ValueError(
                "The trailing quote be present and match the leading quote.")
        return s[1:-1].decode('string_escape')
    return s


# pylint: disable-msg=R0924
Returns the Geometry, simplified using the Douglas-Peucker algorithm
dataset/ETHPy150Open kgaughan/uwhoisd/uwhoisd/utils.py/decode_value--crossover with--dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-1.2/django/contrib/gis/geos/geometry.py/GEOSGeometry.simplify