Waymo Interview Question

How do you approach legacy code?