def coerce(self, value, **kwargs):
        """Coerces value to Location object"""

        Location = namedtuple('Location', ['lat', 'lon'])
        return Location(float(value.get('lat')), float(value.get('lon')))
def coerce ( self , value , ** kwargs ) : Location = namedtuple ( 'Location' , [ 'lat' , 'lon' ] ) return Location ( float ( value . get ( 'lat' ) ) , float ( value . get ( 'lon' ) ) )
Coerces value to Location object