Isabella the witch

Note: Before trying this homework, you should perform an update as described: here
Isabella is spawned when the player goes to a specific [x,y,z] location. If she is killed, the player that killed her is given a random potion.

Spawn a witch and give her a custom name

Start with this diagram:

Drop a random potion

Add this code to your test function:

Download, /reload, /js test() to test your code
Is a random potion dropped when you run the code? This shows that your code is working properly

Check if Isabella dies

For this we will use a different listener event.
Add this listener event code at the bottom of your function:

Download, /reload, /js test() to test your code, kill Isabella, when she dies is a message sent out telling who attacked her? This means your code is working properly

Have Isabells drop a random potion when she dies

Since we already know how to give a player a random potion, how would you do this only when Isabella dies?
Hint: Use logic if statement that already exists
Also: Location of the dropped potion should be Isabella's location

Extra Credit: Only spawn Isabella if she does not currently exist

You can use this diagram as a reference: