tracker.update(UserUtteranceReverted()) AttributeError: 'Tracker' object has no attribute 'update'

I am using rasa_core=0.11.12 and rasa_nlu=0.13.7

t1=tracker.copy()
entities=t1.latest_message["entities"]
intent=t1.latest_message["intent"]["name"]
while (intent!="xyz"):
    t1.update(UserUtteranceReverted())
    entities=t1.latest_message["entities"]
    intent=t1.latest_message["intent"]["name"] 

This is the part where error has been caught!

You should return events from a CustomAction, not use the update() method

Create a tracker object by invoking DialogueStateTracker class. U can use below code

from rasa_core.trackers import DialogueStateTracker

from rasa_core.domain import Domain

t1=DialogueStateTracker(sender_id,domain.slots)