code: def test_client():
      io = Interface(lambda x: x + x, "text", "text")
      app, _, _ = io.launch(prevent_thread_lock=True)
      test_client = TestClient(app)
      yield test_client
      io.close()
      close_all()
  
imports: import functools
  import os
  import tempfile
  from contextlib import asynccontextmanager, closing
  from unittest import mock
  import gradio_client
  import numpy
  import pandas
  import pytest
  import starlette.routing
  from fastapi import FastAPI
  from fastapi.testclient import TestClient
  from gradio_client import media_data
  import gradio
  from gradio import Blocks, Button, Interface, Number, Textbox, close_all, routes, wasm_utils
  from gradio.route_utils import FnIndexInferError
label_desc: Use image node_id 1 for calling a global function with example usage: test_client() without return types