@contextmanager
def mocked_context(*args, **kwargs):
 (yield type('Tunnelled', (object,), {}))

@ contextmanager def mocked_context ( * args , ** kwargs ) : ( yield type ( 'Tunnelled' , ( object , ) , { } ) )
to be directly patched into an ssh .