First time here? Check out the FAQ!
Using the version 3.1.0 compiled with opencv_contrib in python 2, the method is in the module motempl, so you can use as: cv2.motempl.updateMotionHistory(...)
cv2.motempl.updateMotionHistory(...)