Unable to terminate kernel

import os, signal
os.kill(os.getpid(), signal.SIGKILL)

after running this line of code in Colab, I am getting the following message “Your session restarted after a crash. Diagnosing…”, and then it says the session must be restarted and the reason for crash was unknown. Anyone have any ideas? The rest of my code works fine.

Please try this: