code: def write_tensor_header(
      fout: BinaryIO,
      name: str,
      shape: Sequence[int],
      data_type: np.dtype[Any],
  ) -> None:
      sname = name.encode("utf-8")
      fout.write(
          struct.pack(
              "iii",
              len(shape),
              len(sname),
              NUMPY_TYPE_TO_FTYPE[data_type.name],
          )
      )
      fout.write(struct.pack("i" * len(shape), *shape[::-1]))
      fout.write(sname)
      fout.seek((fout.tell() + 31) & -32)
  
file_path: llama.cpp/convert-lora-to-ggml.py
imports: from __future__ import annotations
  import json
  import os
  import struct
  import sys
  from typing import Any, BinaryIO, Sequence
  import numpy
  import torch
  from pathlib import Path
  import gguf
label_desc: Use image node_id 2 for calling a global function with example usage: write_tensor_header(fout, name, shape, data_type) without return types