code: def save_config(config, config_path):
      """save config to file"""
      if isinstance(config_path, Path):
          config_path = str(config_path)
  
      with open(config_path, "w") as f:  # pylint: disable=invalid-name
          if config_path.endswith("yml") or config_path.endswith(
              "yaml"
          ):
              yaml.dump(config, f)
          elif config_path.endswith("json"):
              json.dump(config, f)
  
file_path: delta/delta/utils/config.py
imports: from typing import List, Union
  import os
  import json
  import time
  from shutil import copyfile, SameFileError
  from pathlib import Path
  import yaml
  from absl import logging
label_desc: Use image node_id 6 for calling a global function with example usage: save_config(config, config_path) without return types