Yen's K shortest Path giving incorrect results (Python)?

I am trying to implement the Yen's K Shortest Path Algorihtm based on the pseudo-code from https://en.wikipedia.org/...