Problem in assignment C1W2_Assignment of course Introduction to TensorFlow for Artificial Intelligence, Machine Learning, and

In Introduction to TensorFlow for Artificial Intelligence, Machine Learning, and… course I am trying to complete the week 2 lab which is about callbacks in training a model.
when I run hist = train_mnist(x_train, y_train) command , the following error is shown:

AttributeError: ‘myCallback’ object has no attribute ‘set_model’

Can anybody help me?

Are you running the notebook in Coursera Labs, or have you installed the notebook on some other platform?

I am launching the nootebook and writing codes there.

The problem has been solved. I forgot to put tf.keras.callbacks.Callback parameter in callback class definition.