lisa.wlgen.rta: Use nullcontext() to avoid code duplication
Isolate the choice of context manager from the rest of the code rather than copying the code to run in the different paths.
Isolate the choice of context manager from the rest of the code rather than copying the code to run in the different paths.