def METHOD_NAME(self):
    filename = os.path.join(
        self.get_temp_dir(), "write_after_async_writer_closed"
    )
    w = _AsyncWriter(open(filename, "wb"))
    bytes_to_write = b"x" * 64
    w.write(bytes_to_write)
    w.close()
    with self.assertRaises(IOError):
        w.write(bytes_to_write)
    # nothing is written to the file after close
    with open(filename, "rb") as f:
        self.assertEqual(f.read(), bytes_to_write)