def METHOD_NAME(self, object):
    self.check_compatible_object(object)
    if self._monitoring is not None:
        raise RuntimeError(
            f"TimingMonitor is already monitoring {self._monitoring!r} and cannot also monitor {object!r}")
    self._monitoring = object
    self._old_timing_monitor = object.timing_monitor
    object.timing_monitor = self