For me, Google Colab crashed when I was trying to create an ROC graph using matplotlib. Try commenting this out and see if your code runs without crashing colab.