Python Apply Function On Coordinate