Python Function Return Object From Map