# Path: bamboo/config/settings.py
# RUN_PROFILER = False
# 
# Path: bamboo/lib/async.py
# def set_async(on):
#     if on:
#         if not is_async():
#             del os.environ[ASYNC_FLAG]
#     else:
#         os.environ[ASYNC_FLAG] = 'True'


from functools import wraps
from bamboo.config.settings import RUN_PROFILER
from bamboo.lib.async import set_async
import time



def requires_async(func):
    @wraps(func)
    def wrapper(*args, **kwargs):
        set_async(True)
        result = func(*args, **kwargs)
        set_async(False)
        return result
    return wrapper


def run_profiler(func):
    @wraps(func)
    def wrapper(*args, **kwargs):

# Path: bamboo/config/settings.py
# RUN_PROFILER = False
# 
# Path: bamboo/lib/async.py
# def set_async(on):
#     if on:
#         if not is_async():
#             del os.environ[ASYNC_FLAG]
#     else:
#         os.environ[ASYNC_FLAG] = 'True'


# Path: bamboo/tests/decorators.py
from functools import wraps
from bamboo.config.settings import RUN_PROFILER
from bamboo.lib.async import set_async
import time




def requires_async(func):
    @wraps(func)
    def wrapper(*args, **kwargs):
        set_async(True)
        result = func(*args, **kwargs)
        set_async(False)
        return result
    return wrapper


def run_profiler(func):
    @wraps(func)
    def wrapper(*args, **kwargs):

        if RUN_PROFILER: