def METHOD_NAME(conn):
    cur = conn.cursor()
    ensure_table(cur, sample_tabledef)
    with cur.copy("copy copy_in from stdin") as copy:
        copy.write(sample_text.decode())
    data = cur.execute("select * from copy_in order by 1").fetchall()
    assert data == sample_records