code: def _get_batch_size(batch):
      if isinstance(batch, tuple):
          return batch[0].shape[0]
  
      assert isinstance(batch, np.ndarray)
      return batch.shape[0]
  
imports: import numpy
  import os
  from packaging.version import Version, parse
  import torch
  from uuid import uuid4
  from onnxconverter_common.registration import get_converter
  from onnxconverter_common.topology import Topology
  import onnx
  from hummingbird.ml.containers import PyTorchSklearnContainerRegression, PyTorchSklearnContainerClassification, PyTorchSklearnContainerTransformer, PyTorchSklearnContainerAnomalyDetection, TorchScriptSklearnContainerRegression, TorchScriptSklearnContainerClassification, TorchScriptSklearnContainerTransformer, TorchScriptSklearnContainerAnomalyDetection, ONNXSklearnContainerRegression, ONNXSklearnContainerClassification, ONNXSklearnContainerTransformer, ONNXSklearnContainerAnomalyDetection, TVMSklearnContainerRegression, TVMSklearnContainerClassification, TVMSklearnContainerTransformer, TVMSklearnContainerAnomalyDetection, BatchContainer
  from hummingbird.ml._utils import pandas_installed, tvm_installed, get_device, from_strings_to_ints
  from hummingbird.ml._executor import Executor
  from hummingbird.ml.exceptions import MissingConverter
  from hummingbird.ml.operator_converters import constants
label_desc: Use image node_id 3 for calling a global function with example usage: _get_batch_size(batch) and returns: batch, batch