code: def main():
      cfg = handle_args()
      data = np.memmap(cfg.input, mode="r")
      chk = Checkpoint()
      offset = 0
      offset = chk.load(data, offset)
      # we should have read all available data
      assert offset == len(data)
  
      gguf_writer = gguf.GGUFWriter(
          cfg.output,
          gguf.MODEL_ARCH_NAMES[gguf.MODEL_ARCH.LLAMA],
          use_temp_file=False,
      )
      chk.save_gguf(gguf_writer)
      print("    gguf: write header")
      gguf_writer.write_header_to_file()
      print("    gguf: write metadata")
      gguf_writer.write_kv_data_to_file()
      print("    gguf: write tensors")
      gguf_writer.write_tensors_to_file()
      gguf_writer.close()
  
imports: import argparse
  import os
  import struct
  import sys
  import numpy
  from pathlib import Path
  import gguf
label_desc: Use image node_id 3 for calling a global function with example usage: main() without return types