Arista Networks interview question

some code with bugs to debug