def METHOD_NAME(target_class):
    with pytest.raises(ValueError):
        target_class.from_string("string_routine")
    with pytest.raises(ValueError):
        target_class.from_string("string_dataset.string_routine")
    with pytest.raises(ValueError):
        target_class.from_string("a.b.c.d")