Good illustration that a seemingly simple feature could require a ton of functionality under the hood. Would be nice to have this in Python.