That sounds like the perfect place to use a Python function decorator, which lets you wrap a funtion in standard boilerplate.
That sounds like the perfect place to use a Python function decorator, which lets you wrap a funtion in standard boilerplate.