code: def _predict_common(
      self,
      predict_func,
      remainder_predict_func,
      *inputs,
      concatenate_outputs=True,
  ):
      if DataFrame is not None and isinstance(inputs[0], DataFrame):
          # Split the dataframe into column ndarrays.
          inputs = inputs[0]
          input_names = list(inputs.columns)
          splits = [
              inputs[input_names[idx]]
              for idx in range(len(input_names))
          ]
          inputs = tuple(
              [df.to_numpy().reshape(-1, 1) for df in splits]
          )
  
      def output_proc(predictions):
          if concatenate_outputs:
              return np.concatenate(predictions)
          return predictions
  
      is_tuple = isinstance(inputs, tuple)
  
      if is_tuple:
          total_size = inputs[0].shape[0]
      else:
          total_size = inputs.shape[0]
  
      if total_size == self._batch_size:
          # A single batch inference case
          return output_proc([predict_func(*inputs)])
  
      iterations = total_size // self._batch_size
      iterations += 1 if total_size % self._batch_size > 0 else 0
      iterations = max(1, iterations)
      predictions = []
  
      for i in range(0, iterations):
          start = i * self._batch_size
          end = min(start + self._batch_size, total_size)
          if is_tuple:
              batch = tuple([input[start:end, :] for input in inputs])
          else:
              batch = inputs[start:end, :]
  
          if i == iterations - 1:
              assert (end - start) == self._remainder_size
              out = remainder_predict_func(*batch)
          else:
              out = predict_func(*batch)
  
          predictions.append(out)
  
      return output_proc(predictions)
  
file_path: hummingbird/hummingbird/ml/containers/batch_container.py
imports: import numpy
  from hummingbird.ml._utils import pandas_installed
label_desc: Use image node_id 8 for calling the BatchContainer obj's underlying member method code with example usage: obj._predict_common(predict_func, remainder_predict_func) and returns: output_proc, predictions, output_proc, np