docstr: Save a network with simple metadata to a file.
docstr_tok: ["Save","a","network","with","simple","metadata","to","a","file","."]
code: def test_save_net_with_metadata_with_extra(self):
      """Save a network with simple metadata to a file."""
      m = torch.jit.script(TestModule())
  
      test_metadata = {"foo": [1, 2], "bar": "string"}
  
      with tempfile.TemporaryDirectory() as tempdir:
          save_net_with_metadata(
              m, f"{tempdir}/test", meta_values=test_metadata
          )
  
          self.assertTrue(os.path.isfile(f"{tempdir}/test.ts"))
  
file_path: MONAI/tests/test_torchscript_utils.py
imports: from __future__ import annotations
  import os
  import tempfile
  import unittest
  import torch
  from monai.config import get_config_values
  from monai.data import load_net_with_metadata, save_net_with_metadata
  from monai.utils import JITMetadataKeys
label_desc: Use image node_id 3 for calling the TestTorchscript obj's underlying member method code with example usage: obj.test_save_net_with_metadata_with_extra() without return types