code: def _generate_pytorch_input(
      self, input_shape_with_batch, input_data_with_batch
  ):
      if input_data_with_batch is None:
          dummy_input = [
              torch.autograd.Variable(torch.randn(shape))
              for shape in input_shape_with_batch
          ]
      else:
          dummy_input = [
              torch.autograd.Variable(torch.LongTensor(data))
              for data in input_data_with_batch
          ]
      if len(dummy_input) == 1:
          dummy_input = dummy_input[0]
      return dummy_input
  
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 2 for calling the OnnxTestCase obj's underlying member method code with example usage: obj._generate_pytorch_input(input_shape_with_batch, input_data_with_batch) and returns: dummy_input