code: def inference(idx, inputs, model, send_queue):
      if isinstance(inputs, tuple):
          output = model(*inputs)
      else:
          output = model(inputs)
      send_queue.put((idx, output))
  
file_path: BigDL/python/nano/src/bigdl/nano/pytorch/inference/multi_instance.py
imports: from typing import Union, List
  import torch
  from torch.utils.data.dataset import TensorDataset
  from torch.utils.data.dataloader import DataLoader
  from bigdl.nano.utils.common import invalidInputError, invalidOperationError
  from bigdl.nano.pytorch.model import AcceleratedLightningModule
label_desc: Use image node_id 2 for calling a global function with example usage: inference(idx, inputs, model, send_queue) without return types