code: def save_credential(key: str, value: str) -> str:
      credentials = get_credentials_file()
      if key in credentials:
          raise Exception(
              f"{key} already set in credentials file. Can't overwrite."
          )
      credentials[key] = value
      try:
          dirname = os.path.dirname(CREDENTIALS_PATH)
          if not os.path.exists(dirname):
              os.makedirs(dirname, exist_ok=True)
          with open(CREDENTIALS_PATH, "w") as f:
              f.write(f"{json.dumps(credentials)}")
      except Exception as e:
          raise e
      return value
  
imports: import argparse
  import json
  import os
  from typing import Callable
  from typing import Dict
  from typing import Optional
  from typing import Union
  import uuid
  from nacl.encoding import HexEncoder
  from nacl.signing import SigningKey
label_desc: Use image node_id 4 for calling a global function with example usage: save_credential(key, value) and returns: value