def detect_environment():
    'Detect the current environment: default, eventlet, or gevent.'
    global _environment
    if (_environment is None):
        _environment = _detect_environment()
    return _environment
Detect the current environment: default, eventlet, or gevent.
def detect_environment():
    
    global _environment
    if (_environment is None):
        _environment = _detect_environment()
    return _environment