@contextmanager
def remove_ccx(to_strip):
 (stripped, ccx) = strip_ccx(to_strip)
 (yield (stripped, partial(restore_ccx_collection, ccx_id=ccx)))

@ contextmanager def remove_ccx ( to_strip ) : ( stripped , ccx ) = strip_ccx ( to_strip ) ( yield ( stripped , partial ( restore_ccx_collection , ccx_id = ccx ) ) )
a context manager for wrapping modulestore api methods .