Sometimes I need a dummy context manager that does nothing. It can then be used as a stand-in for a more useful, but optional, context manager. For example:
ctx_
I just used threading.Lock() as a dummy context manager. Temporary lock, only used by the context manager.
threading.Lock()