def run_only_if_yaml_is_available(func):
    try:
        import yaml
    except __HOLE__:
        yaml = None
    pred = lambda: yaml is not None
    return run_only(func, pred)
dataset/ETHPy150Open BrightcoveOS/Diamond/src/collectors/puppetagent/test/testpuppetagent.py/run_only_if_yaml_is_available