Sensor Map Function In Python 3