def METHOD_NAME(tmpdir):
    from tests.integration.hot_reload.exec2.my_executor2 import MyExecutorToReload2
    f = Flow().add(uses=MyExecutorToReload2, reload=True)
    with f:
        res = f.post(on='/', inputs=DocumentArray.empty(10))
        assert len(res) == 10
        for doc in res:
            assert doc.text == 'MyExecutorBeforeReload'
        with _update_file(
            os.path.join(cur_dir, 'helper2.py'),
            os.path.join(cur_dir, 'exec2/helper.py'),
            str(tmpdir),
        ):
            res = f.post(on='/', inputs=DocumentArray.empty(10))
            assert len(res) == 10
            for doc in res:
                assert doc.text == 'MyExecutorAfterReload'
        res = f.post(on='/', inputs=DocumentArray.empty(10))
        assert len(res) == 10
        for doc in res:
            assert doc.text == 'MyExecutorBeforeReload'