def run_only_if_psycopg2_is_available(func):
    try:
        import psycopg2
    except __HOLE__:
        psycopg2 = None
    pred = lambda: psycopg2 is not None
    return run_only(func, pred)
dataset/ETHPy150Open Yelp/fullerite/src/diamond/collectors/slony/test/testslony.py/run_only_if_psycopg2_is_available