Peter's PR: https://github.com/wpilibsuite/allwpilib/pull/7744 Look at the C++ code in `wpilibc/src/main/native/cpp/opmode/PeriodicOpMode.cpp` and the python wrappers in: `wpilibc/src/main/python/semiwrap`