def METHOD_NAME(self):
    with tempfile.TemporaryDirectory() as tmpdirname:
        io = gr.Interface(
            lambda x: x,
            "text",
            "text",
            flagging_dir=tmpdirname,
            flagging_callback=flagging.SimpleCSVLogger(),
        )
        io.launch(prevent_thread_lock=True)
        row_count = io.flagging_callback.flag(["test", "test"])
        assert row_count == 0  # no header in SimpleCSVLogger
        row_count = io.flagging_callback.flag(["test", "test"])
        assert row_count == 1  # no header in SimpleCSVLogger
    io.close()