code: def save_file(
      tensor_dict: Dict[str, np.ndarray],
      filename: Union[str, os.PathLike],
      metadata: Optional[Dict[str, str]] = None,
  ) -> None:
      """
      Saves a dictionnary of tensors into raw bytes in safetensors format.
  
      Args:
          tensor_dict (`Dict[str, np.ndarray]`):
              The incoming tensors. Tensors need to be contiguous and dense.
          filename (`str`, or `os.PathLike`)):
              The filename we're saving into.
          metadata (`Dict[str, str]`, *optional*, defaults to `None`):
              Optional text only metadata you might want to save in your header.
              For instance it can be useful to specify more about the underlying
              tensors. This is purely informative and does not affect tensor loading.
  
      Returns:
          `None`
  
      Example:
  
      ```python
      from safetensors.numpy import save_file
      import numpy as np
  
      tensors = {"embedding": np.zeros((512, 1024)), "attention": np.zeros((256, 256))}
      save_file(tensors, "model.safetensors")
      ```
      """
      flattened = {
          k: {
              "dtype": v.dtype.name,
              "shape": v.shape,
              "data": _tobytes(v),
          }
          for k, v in tensor_dict.items()
      }
      serialize_file(flattened, filename, metadata=metadata)
  
file_path: safetensors/bindings/python/py_src/safetensors/numpy.py
imports: import os
  import sys
  from typing import Dict, Optional, Union
  import numpy
  from safetensors import deserialize, safe_open, serialize, serialize_file
label_desc: Use image node_id 3 for calling a global function with example usage: save_file(tensor_dict, filename, metadata) without return types