def restore_saved_module(module):
 if (not (module in monkey.saved)):
  return
 _module = __import__(module)
 for attr in monkey.saved[module]:
  if hasattr(_module, attr):
   setattr(_module, attr, monkey.saved[module][attr])

def restore_saved_module ( module ) : if ( not ( module in monkey . saved ) ) : return _module = __import__ ( module ) for attr in monkey . saved [ module ] : if hasattr ( _module , attr ) : setattr ( _module , attr , monkey . saved [ module ] [ attr ] )
gevent monkey patch keeps a list of all patched modules .