code: def _get_column_index(i, inputs):
      """
      Taken from https://github.com/onnx/sklearn-onnx/blob/9939c089a467676f4ffe9f3cb91098c4841f89d8/skl2onnx/common/utils.py#L50.
      Returns a tuples (variable index, column index in that variable).
      The function has two different behaviours, one when *i* (column index)
      is an integer, another one when *i* is a string (column name).
      If *i* is a string, the function looks for input name with this name and returns (index, 0).
      If *i* is an integer, let's assume first we have two inputs
      *I0 = FloatTensorType([None, 2])* and *I1 = FloatTensorType([None, 3])*,
      in this case, here are the results:
      ::
          get_column_index(0, inputs) -> (0, 0)
          get_column_index(1, inputs) -> (0, 1)
          get_column_index(2, inputs) -> (1, 0)
          get_column_index(3, inputs) -> (1, 1)
          get_column_index(4, inputs) -> (1, 2)
      """
      if isinstance(i, int):
          if i == 0:
              # Useful shortcut, skips the case when end is None
              # (unknown dimension)
              return 0, 0
          if inputs[0].type is None:
              return 0, i
          vi = 0
          pos = 0
          end = inputs[0].type.shape[1]
          if end is None:
              raise RuntimeError(
                  "Cannot extract a specific column {0} when "
                  "one input ('{1}') has unknown "
                  "dimension.".format(i, inputs[0])
              )
          while True:
              if pos <= i < end:
                  return (vi, i - pos)
              vi += 1
              pos = end
              if vi >= len(inputs):
                  raise RuntimeError(
                      "Input {} (i={}, end={}) is not available in\n{}".format(
                          vi, i, end, pprint.pformat(inputs)
                      )
                  )
              rel_end = inputs[vi].type.shape[1]
              if rel_end is None:
                  raise RuntimeError(
                      "Cannot extract a specific column {0} when "
                      "one input ('{1}') has unknown "
                      "dimension.".format(i, inputs[vi])
                  )
              end += rel_end
      else:
          assert isinstance(
              i, str
          ), "Type {} not supported. Please fill an issue on https://github.com/microsoft/hummingbird/.".format(
              type(i)
          )
          for ind, inp in enumerate(inputs):
              if inp.onnx_name == i:
                  return ind, 0
          raise RuntimeError(
              "Unable to find column name '{0}'".format(i)
          )
  
imports: from collections import OrderedDict
  from copy import deepcopy
  import pprint
  from uuid import uuid4
  import numpy
  from onnxconverter_common.optimizer import LinkedNode, _topological_sort
  from sklearn import pipeline
  from sklearn.compose import ColumnTransformer
  from sklearn.ensemble import BaggingClassifier, BaggingRegressor
  from sklearn.model_selection import GridSearchCV, RandomizedSearchCV
  from sklearn.multioutput import MultiOutputRegressor, RegressorChain
  from sklearn.preprocessing import OneHotEncoder
  from .containers import CommonSklearnModelContainer, CommonONNXModelContainer, CommonSparkMLModelContainer
  from ._topology import Topology
  from ._utils import sklearn_installed, sparkml_installed
  from .operator_converters import constants
  from .supported import get_sklearn_api_operator_name, get_onnxml_api_operator_name, get_sparkml_api_operator_name
label_desc: Use image node_id 25 for calling a global function with example usage: _get_column_index(i, inputs) and returns: int,  int, int,  i, vi,  unknown, ind,  int