code: def write_flag(path: str, key: str, value: str):
      """Writes a new flag
  
      Args:
          path: path to flag json
          key: key of the flag
          value: values of the flag
      """
  
      logger.debug(f"Writing flag {key}: {value}")
  
      if os.path.exists(path):
          with open(path, "r+") as file:
              flags = json.load(file)
      else:
          flags = {}
  
      flags[key] = value
  
      with open(path, "w+") as file:
          json.dump(flags, file)
  
file_path: h2o-llmstudio/llm_studio/src/utils/logging_utils.py
imports: import io
  import json
  import logging
  import os
  import re
  from typing import Any, Optional
  from llm_studio.src.utils.plot_utils import PlotData
label_desc: Use image node_id 2 for calling a global function with example usage: write_flag(path, key, value) without return types