code: def create_fastdeploy_api_call():
      api = FastDeployServerApi()
      routes = {
          "get_directory": (api.get_directory, ["dir"]),
          "config_update": (
              api.config_update,
              ["dir", "name", "config", "config_filename"],
          ),
          "get_config": (api.get_config, ["dir"]),
          "get_config_filenames_for_model": (
              api.get_config_filenames_for_model,
              ["dir", "name"],
          ),
          "get_config_for_model": (
              api.get_config_for_model,
              ["dir", "name", "config_filename"],
          ),
          "set_default_config_for_model": (
              api.set_default_config_for_model,
              ["dir", "name", "config_filename"],
          ),
          "delete_config_for_model": (
              api.delete_config_for_model,
              ["dir", "name", "config_filename"],
          ),
          "start_server": (api.start_server, ["config"]),
          "stop_server": (api.stop_server, ["server_id"]),
          "get_server_output": (
              api.get_server_output,
              ["server_id", "length"],
          ),
          "create_fastdeploy_client": (
              api.create_fastdeploy_client,
              ["lang"],
          ),
          "get_server_list": (api.get_server_list, []),
          "get_server_metric": (api.get_server_metric, ["server_id"]),
          "get_server_config": (api.get_server_config, ["server_id"]),
          "get_pretrain_model_list": (api.get_pretrain_model_list, []),
          "check_server_alive": (api.check_server_alive, ["server_id"]),
          "download_pretrain_model": (
              api.download_pretrain_model,
              ["dir", "name", "version", "pretrain_model_name"],
          ),
          "delete_resource_for_model": (
              api.delete_resource_for_model,
              ["dir", "name", "version", "resource_filename"],
          ),
          "rename_resource_for_model": (
              api.rename_resource_for_model,
              [
                  "dir",
                  "name",
                  "version",
                  "resource_filename",
                  "new_filename",
              ],
          ),
      }
  
      def call(path: str, args):
          route = routes.get(path)
          if not route:
              return (
                  json.dumps(gen_result(status=1, msg="api not found")),
                  "application/json",
                  None,
              )
          method, call_arg_names = route
          call_args = [args.get(name) for name in call_arg_names]
          return method(*call_args)
  
      return call
  
imports: import datetime
  import json
  import os
  import re
  import shutil
  import socket
  import time
  from multiprocessing import Process
  from pathlib import Path
  import requests
  from .fastdeploy_client.client_app import create_gradio_client_app
  from .fastdeploy_client.client_app import create_gradio_client_app_en
  from .fastdeploy_lib import analyse_config
  from .fastdeploy_lib import check_process_zombie
  from .fastdeploy_lib import copy_config_file_to_default_config
  from .fastdeploy_lib import delete_files_for_process
  from .fastdeploy_lib import exchange_format_to_original_format
  from .fastdeploy_lib import generate_metric_table
  from .fastdeploy_lib import get_alive_fastdeploy_servers
  from .fastdeploy_lib import get_config_filenames_for_one_model
  from .fastdeploy_lib import get_config_for_one_model
  from .fastdeploy_lib import get_process_model_configuration
  from .fastdeploy_lib import get_process_output
  from .fastdeploy_lib import get_start_arguments
  from .fastdeploy_lib import json2pbtxt
  from .fastdeploy_lib import kill_process
  from .fastdeploy_lib import launch_process
  from .fastdeploy_lib import mark_pid_for_dead_process
  from .fastdeploy_lib import original_format_to_exchange_format
  from .fastdeploy_lib import validate_data
  from visualdl.server.api import gen_result
  from visualdl.server.api import result
  from visualdl.utils.dir import FASTDEPLOYSERVER_PATH
label_desc: Use image node_id 1 for calling a global function with example usage: create_fastdeploy_api_call() and returns: call, method, json,  str,  None