

def run_only_if_pymongo_is_available(func):
    try:
        import pymongo
    except ImportError:
        pymongo = None
    pred = (lambda : (pymongo is not None))
    return run_only(func, pred)

dataset/ETHPy150Open BrightcoveOS/Diamond/src/collectors/mongodb/test/testmongodb.py run_only_if_pymongo_is_available/original