def require_module(module_name):
    found = True
    try:
        __import__(module_name)
    except __HOLE__:
        found = False

    return pytest.mark.skipif(
        not found, reason='Module {0} is required'.format(module_name))
dataset/ETHPy150Open getlogbook/logbook/tests/utils.py/require_module