code: def load_dataset(test_data_dir):
      # load inputs
      inputs = []
      inputs_num = len(
          glob.glob(os.path.join(test_data_dir, "input_*.pb"))
      )
      for i in range(inputs_num):
          input_file = os.path.join(
              test_data_dir, "input_{}.pb".format(i)
          )
          onnx_tensor = onnx.TensorProto()
          with open(input_file, "rb") as f:
              onnx_tensor.ParseFromString(f.read())
          inputs.append(onnx.numpy_helper.to_array(onnx_tensor))
  
      # load reference outputs
      ref_outputs = []
      ref_outputs_num = len(
          glob.glob(os.path.join(test_data_dir, "output_*.pb"))
      )
      for i in range(ref_outputs_num):
          output_file = os.path.join(
              test_data_dir, "output_{}.pb".format(i)
          )
          onnx_tensor = onnx.TensorProto()
          with open(output_file, "rb") as f:
              onnx_tensor.ParseFromString(f.read())
          ref_outputs.append(onnx.numpy_helper.to_array(onnx_tensor))
      return inputs, ref_outputs
  
file_path: singa/examples/onnx/utils.py
imports: import os
  import urllib.request
  import tarfile
  import glob
  import onnx
  import logging
label_desc: Use image node_id 2 for calling a global function with example usage: load_dataset(test_data_dir) and returns: inputs,  ref_outputs