async def METHOD_NAME(aconn, format, buffer):
    cur = aconn.cursor()
    await ensure_table(cur, sample_tabledef)
    async with cur.copy(f"copy copy_in from stdin {copyopt(format)}") as copy:
        await copy.write(globals()[buffer])
    await cur.execute("select * from copy_in order by 1")
    data = await cur.fetchall()
    assert data == sample_records