Is there a better way of achieving this:
if condition:
with context:
do_the_thing()
else:
do_the_thing()
Essentially, in both cases of the condition, the same thing is done, except that if the condition is true, it is done with a certain context.