Write CUDA kernel

I am following this tutorial,

the example is not so clear, anyone can give me a clue?

Cuz I dont code with C, but CUDA is based on C, and I want to use python, so sometimes its not so clear for me:)

Any advice will be appreciated, I have been stucked for days:)