The O2 sensor is a reasonable replacement item as it often is stated to be replaced at 60k miles anyway. We never do it because its function is so easily tested, but often will when there is such a code and the miles are right.
The most important thing to watch when dealing with O2 sensor codes is the adaptation numbers. These should change if the sensor was a problem.
Bosch Master, ASE Master, L1
33 years MB technician