Module 'cv2' has no attribute TPS transformer creator (Google Colab)

I am using the TPS method for image warping. I am using the OpenCV version 4.11.0.86. In my first run, all the codes works good and gives me my required output. Then, i was using the function cv2.createThinPlateSplineShapeTransformer()

However, when I am using the kernel restart and run all option in Google Colab, it is throwing me the error: “module ‘cv2’ has no attribute ‘createThinPlateSplineShapeTransformer’”, for the same code line. How to solve this issue? I am not understanding what is the exact problem here? Should Close the kernel and run from fresh will solve the problem?