def METHOD_NAME(item):
    dev = [mark.args[0] for mark in item.iter_markers(name="device_type")]
    if dev:
        if item.config.getoption("--device_type") not in dev:
            pytest.skip("test requires device type in {!r}".format(dev))
    else:
        pytest.skip("test does not match device type")