code: def copy_config_file_to_default_config(model_dir, config_name):
      json_config = json.loads(
          pbtxt2json(open(os.path.join(model_dir, config_name)).read())
      )
      model_name = os.path.basename(model_dir)
      json_config["name"] = model_name
      text_proto = json2pbtxt(json.dumps(json_config))
      with open(os.path.join(model_dir, "config.pbtxt"), "w") as f:
          f.write(text_proto)
  
imports: import copy
  import json
  import os
  import random
  import re
  import signal
  import string
  from collections import defaultdict
  from subprocess import Popen
  from subprocess import STDOUT
  import google.protobuf.json_format
  import google.protobuf.text_format
  import psutil
  import requests
  from .proto.model_config_pb2 import ModelConfig
  from visualdl.utils.dir import FASTDEPLOYSERVER_PATH
label_desc: Use image node_id 6 for calling a global function with example usage: copy_config_file_to_default_config(model_dir, config_name) without return types