Python Recursive Dfs Shortest Path Implementation Not Working As

Python Recursive Dfs Shortest Path Implementation Not Working As