Custom Map Function In Python Definition