code: def load_test_data(data_dir, input_names, output_names):
      inout_values = []
      for kind, names in [
          ("input", input_names),
          ("output", output_names),
      ]:
          names = list(names)
          values = {}
          for pb in sorted(
              glob.glob(os.path.join(data_dir, "{}_*.pb".format(kind)))
          ):
              tensor = onnx.load_tensor(pb)
              if tensor.name in names:
                  name = tensor.name
                  names.remove(name)
              else:
                  name = names.pop(0)
              values[name] = onnx.numpy_helper.to_array(tensor)
          inout_values.append(values)
      return tuple(inout_values)
  
imports: import glob
  import os
  import warnings
  import numpy
  import onnx
label_desc: Use image node_id 1 for calling a global function with example usage: load_test_data(data_dir, input_names, output_names) and returns: tuple