code: def set_metadata(
      reader: GGUFReader, args: argparse.Namespace
  ) -> None:
      field = reader.get_field(args.key)
      if field is None:
          print(f"! Field {repr(args.key)} not found", file=sys.stderr)
          sys.exit(1)
      # Note that field.types is a list of types. This is because the GGUF
      # format supports arrays. For example, an array of UINT32 would
      # look like [GGUFValueType.ARRAY, GGUFValueType.UINT32]
      handler = (
          reader.gguf_scalar_to_np.get(field.types[0])
          if field.types
          else None
      )
      if handler is None:
          print(
              f"! This tool only supports changing simple values, {repr(args.key)} has unsupported type {field.types}",
              file=sys.stderr,
          )
          sys.exit(1)
      current_value = field.parts[field.data[0]][0]
      new_value = handler(args.value)
      print(
          f"* Preparing to change field {repr(args.key)} from {current_value} to {new_value}"
      )
      if current_value == new_value:
          print(
              f"- Key {repr(args.key)} already set to requested value {current_value}"
          )
          sys.exit(0)
      if args.dry_run:
          sys.exit(0)
      if not args.force:
          print("*** Warning *** Warning *** Warning **")
          print(
              "* Changing fields in a GGUF file can make it unusable. Proceed at your own risk."
          )
          print(
              "* Enter exactly YES if you are positive you want to proceed:"
          )
          response = input("YES, I am sure> ")
          if response != "YES":
              print("You didn't enter YES. Okay then, see ya!")
              sys.exit(0)
      field.parts[field.data[0]][0] = new_value
      print("* Field changed. Successful completion.")
  
file_path: llama.cpp/gguf-py/scripts/gguf-set-metadata.py
imports: import argparse
  import os
  import sys
  from pathlib import Path
  from gguf import GGUFReader
label_desc: Use image node_id 2 for calling a global function with example usage: set_metadata(reader, args) without return types