code: def predict(text, request: gr.Request):
      headers = request.headers
      host = request.client.host
      user_agent = request.headers["user-agent"]
      return {
          "ip": host,
          "user_agent": user_agent,
          "headers": headers,
      }
  
label_desc: Use image node_id 1 for calling a global function with example usage: predict(text, request) and returns: dict