def METHOD_NAME(conn):
    cur = conn.cursor()
    ensure_table(cur, "id serial primary key, data text")
    data = "".join(chr(randrange(1, 256)) for i in range(10 * 1024 * 1024))
    with cur.copy("copy copy_in (data) from stdin") as copy:
        copy.write_row([data])
    cur.execute("select data from copy_in limit 1")
    assert cur.fetchone()[0] == data