Graph Valid Tree - Medium Python Graphs Interview Problem | Unnested