def METHOD_NAME(conn, wrapper, fmt_in):
    wrapper = getattr(psycopg.types.json, wrapper)
    obj = {"foo": "bar"}
    cur1 = conn.cursor()
    cur2 = conn.cursor()
    set_json_dumps(my_dumps, cur2)
    cur1.execute(f"select %{fmt_in.value}->>'baz'", (wrapper(obj),))
    assert cur1.fetchone()[0] is None
    cur2.execute(f"select %{fmt_in.value}->>'baz'", (wrapper(obj),))
    assert cur2.fetchone()[0] == "qux"