code: def _get_trace_input_from_test_input(
      input, remainder_size=None, extra_config={}
  ):
      """
      Utility function used to properly put the inputs into a format understandable by torch.
      If `remainder_size` is provided, also return inputs for a remainder model (see below).
      """
      remainder = None
      if isinstance(input, tuple):
          trace_input = []
          for input_ in input:
              # Convert string arrays into int32.
              if input_.dtype.kind in constants.SUPPORTED_STRING_TYPES:
                  assert constants.MAX_STRING_LENGTH in extra_config
                  max_string_length = extra_config[
                      constants.MAX_STRING_LENGTH
                  ]
  
                  input_ = from_strings_to_ints(
                      input_, max_string_length
                  )
              trace_input.append(torch.from_numpy(input_))
          trace_input = tuple(trace_input)
          if remainder_size is not None and remainder_size != 0:
              remainder = tuple(
                  [inp[0:remainder_size, :] for inp in trace_input]
              )
      else:
          # Convert string arrays into int32.
          if input.dtype.kind in constants.SUPPORTED_STRING_TYPES:
              assert constants.MAX_STRING_LENGTH in extra_config
              max_string_length = extra_config[
                  constants.MAX_STRING_LENGTH
              ]
  
              input = from_strings_to_ints(input, max_string_length)
          trace_input = torch.from_numpy(input)
          if remainder_size is not None and remainder_size != 0:
              remainder = trace_input[0:remainder_size, :]
  
      return (trace_input, remainder)
  
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 2 for calling a global function with example usage: _get_trace_input_from_test_input(input, remainder_size, extra_config) and returns: trace_input,  remainder