code: def get_gradio_client():
      try:
          from gradio_utils.grclient import GradioClient as Client
  
          concurrent_client = True
      except ImportError:
          print(
              "Using slower gradio API, for speed ensure gradio_utils/grclient.py exists."
          )
          from gradio_client import Client
  
          concurrent_client = False
  
      gradio_prefix = os.getenv("GRADIO_PREFIX", "http")
      gradio_host = os.getenv("GRADIO_SERVER_HOST", "localhost")
      gradio_port = int(os.getenv("GRADIO_SERVER_PORT", "7860"))
      gradio_url = f"{gradio_prefix}://{gradio_host}:{gradio_port}"
      print("Getting gradio client at %s" % gradio_url, flush=True)
      client = Client(gradio_url)
      if concurrent_client:
          client.setup()
      return client
  
imports: import ast
  import os
  import time
  import uuid
  from collections import deque
  from log import logger
label_desc: Use image node_id 4 for calling a global function with example usage: get_gradio_client() and returns: client