Mapping Function In Python Definition