Getting Frustrated by CompSci 2 - 43) Long Road (Python)

hero.moveXY(78, 35)
def onSpawn(event):
pass

#inside a while-true loop:
while True:
    
    #Use Hero.findNearestItem()
    healthpotion = pet.findNearestByType("healthpotion")
    
    #If there's an item:
    if healthpotion:
        pet.fetch(healthpotion)

pet.on(“spawn”, OnSpawn)
hero.moveXY(78,35)


He keeps dying, I just can’t get it to work. I’m going into Day 3 on this level, please help.

Please format your code according to the FAQ
also, it says here:

SO DO THAT!