def METHOD_NAME(queue):
    write_to_log("run_proxy\n")
    try:
        try:
            loop = asyncio.get_event_loop()
        except RuntimeError:
            # We can get RuntimeError due to current thread being not main thread on Python 3.8.
            # It's not clear why that happens, so work around it.
            loop = asyncio.new_event_loop()
            asyncio.set_event_loop(loop)
        coro = asyncio.start_server(handle_client, host="127.0.0.1")
        server = loop.run_until_complete(coro)
        host, port = server.sockets[0].getsockname()
        queue.put(port)
        def signal_handler(sig, trace):
            raise KeyboardInterrupt
        signal.signal(signal.SIGTERM, signal_handler)
        write_to_log(f"Serving on {host}:{port}\n")
        try:
            write_to_log("Running forever\n")
            loop.run_forever()
        except KeyboardInterrupt:
            write_to_log("End\n")
        server.close()
        loop.run_until_complete(server.wait_closed())
        loop.close()
    except BaseException as e:
        write_to_log(f"Exception Raised: {str(e)}\n", with_traceback=True)
    finally:
        queue.put(get_log_path())