Kernel Function Example In Python Code