def METHOD_NAME():
    arr = np.empty((1,), dtype=object)
    arr.flags.writeable = False
    # set_first_element cannot change the input array
    with pytest.raises(ValueError):
        set_first_element(42, arr)
    # writable flag goes to original state
    assert not arr.flags.writeable