def run_only_if_redis_is_available(func):
    """Decorator for checking if python-redis is available.
    Note: this test will be silently skipped if python-redis is missing.
    """
    try:
        import redis
    except __HOLE__:
        redis = None
    pred = lambda: redis is not None
    return run_only(func, pred)
dataset/ETHPy150Open BrightcoveOS/Diamond/src/collectors/redisstat/test/testredisstat.py/run_only_if_redis_is_available