code: def _convert_ndarray_to_tensor(self, input_data_with_batch):
      tensors = [
          torch.from_numpy(input) for input in input_data_with_batch
      ]
      if len(tensors) == 1:
          return tensors[0]
      else:
          return tensors
  
file_path: analytics-zoo/pyzoo/test/zoo/pipeline/utils/test_utils_onnx.py
imports: from __future__ import print_function
  import numpy
  import onnx
  import torch
  from zoo.pipeline.api.onnx.onnx_loader import OnnxLoader
  from .test_utils import ZooTestCase
  from bigdl.util.common import to_list
label_desc: Use image node_id 3 for calling the OnnxTestCase obj's underlying member method code with example usage: obj._convert_ndarray_to_tensor(input_data_with_batch) and returns: tensors, tensors