code: def copy_model_files(c, config_file, out_path, new_fields):
      """Copy config.json and other model files to training folder and add
      new fields.
  
      Args:
          c (dict): model config from config.json.
          config_file (str): path to config file.
          out_path (str): output path to copy the file.
          new_fields (dict): new fileds to be added or edited
              in the config file.
      """
      # copy config.json
      copy_config_path = os.path.join(out_path, "config.json")
      config_lines = open(config_file, "r").readlines()
      # add extra information fields
      for key, value in new_fields.items():
          if isinstance(value, str):
              new_line = '"{}":"{}",\n'.format(key, value)
          else:
              new_line = '"{}":{},\n'.format(key, value)
          config_lines.insert(1, new_line)
      config_out_file = open(copy_config_path, "w")
      config_out_file.writelines(config_lines)
      config_out_file.close()
      # copy model stats file if available
      if c.audio["stats_path"] is not None:
          copy_stats_path = os.path.join(out_path, "scale_stats.npy")
          copyfile(c.audio["stats_path"], copy_stats_path)
  
file_path: TTS/TTS/utils/io.py
imports: import os
  import re
  import json
  import yaml
  import pickle
  from shutil import copyfile
label_desc: Use image node_id 3 for calling a global function with example usage: copy_model_files(c, config_file, out_path, new_fields) without return types