code: def test_custom_upload_path(self, gradio_temp_dir):
      io = Interface(lambda x: x + x, "text", "text")
      app, _, _ = io.launch(prevent_thread_lock=True)
      test_client = TestClient(app)
      with open("test/test_files/alphabet.txt", "rb") as f:
          response = test_client.post("/upload", files={"files": f})
      assert response.status_code == 200
      file = response.json()[0]
      assert "alphabet" in file
      assert file.startswith(str(gradio_temp_dir))
      assert file.endswith(".txt")
      with open(file, "rb") as saved_file:
          assert saved_file.read() == b"abcdefghijklmnopqrstuvwxyz"
  
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 6 for calling the TestRoutes obj's underlying member method code with example usage: obj.test_custom_upload_path(gradio_temp_dir) without return types