def METHOD_NAME():
    def dummylink(x):
        return 2 * x
    # check we raise error if link has no inverse
    with pytest.raises(TypeError):
        get_link_fn_from_str_or_fn(dummylink)
    def dummylink_inv(x):
        return x / 2
    dummylink.inverse = dummylink_inv
    fn = get_link_fn_from_str_or_fn(dummylink)
    assert fn(2) == 4
    assert fn.inverse(2) == 1