code: def save_onnx_model_with_validation_data(
      tmpdir,
      model,
      data,
      name,
      device=None,
      use_external_files_to_store_parameters=False,
  ):
      folder = os.path.join(str(tmpdir), "test_" + name)
      create_or_purge_folder(folder)
      model_file_name = os.path.join(folder, name + ".onnx")
  
      input_dict = dict(zip(model.arguments, data))
      o0 = model.eval(input_dict, device=device)
      model.save(
          model_file_name,
          format=C.ModelFormat.ONNX,
          use_external_files_to_store_parameters=use_external_files_to_store_parameters,
      )
  
      onnx_model = onnx.load(model_file_name)
  
      test_data_path = os.path.join(folder, "test_data_set_0")
      create_or_purge_folder(test_data_path)
      save_test_data(
          model,
          onnx_model,
          test_data_path,
          data,
          np.array(o0),
          name,
          tmpdir,
      )
  
imports: import os
  import re
  import shutil
  import numpy
  import scipy
  import cntk
  import pytest
  from .onnx_verify_helper import verify_results_with_onnxruntime, get_onnx_test_runner_callscript
label_desc: Use image node_id 13 for calling a global function with example usage: save_onnx_model_with_validation_data(tmpdir, model, data, name, device, use_external_files_to_store_parameters) without return types