I am getting AttributeError: module 'PIL' has no attribute 'Image'

In case someone encounters the same error:
It occurred in my Colab environment as well. I solved it by following the solution in this link:

I did not reinstall PIL by the way
I did restart the runtime.