<s> import logging <EOL> import sys <EOL> import socket <EOL> log = logging . getLogger ( ) <EOL> log . setLevel ( '<STR_LIT>' ) <EOL> if not log . handlers : <EOL> handler = logging . StreamHandler ( ) <EOL> handler . setFormatter ( logging . Formatter ( '<STR_LIT>' ) ) <EOL> log . addHandler ( handler ) <EOL> def is_eventlet_monkey_patched ( ) : <EOL> if '<STR_LIT>' not in sys . modules : <EOL> return False <EOL> import eventlet . patcher <EOL> return eventlet . patcher . is_monkey_patched ( '<STR_LIT>' ) <EOL> def is_gevent_monkey_patched ( ) : <EOL> if '<STR_LIT>' not in sys . modules : <EOL> return False <EOL> import gevent . socket <EOL> return socket . socket is gevent . socket . socket <EOL> def is_monkey_patched ( ) : <EOL> return is_gevent_monkey_patched ( ) or is_eventlet_monkey_patched ( ) </s>
