code: def parse_onnx_api_model(model):
      """
      Puts *ONNX* object into an abstract representation so that our framework can work seamlessly on models created
      with different machine learning tools.
  
      Args:
          model: A model object in onnx format
  
      Returns:
          A `onnxconverter_common.topology.Topology` object representing the input model
      """
      assert model is not None, "Cannot convert a mode of type None."
  
      raw_model_container = CommonONNXModelContainer(model)
  
      # We modify the ONNX model during translation
      model = deepcopy(model)
  
      # Declare a computational graph. It will become a representation of
      # the input ONNX model after parsing.
      topology = Topology(raw_model_container)
  
      # Declare input variables.
      inputs = []
      for i in model.graph.input:
          inputs.append(topology.declare_logical_variable(i.name))
  
      # The object raw_model_container is a part of the topology we're going to return.
      # We use it to store the inputs of the ONNX graph.
      for variable in inputs:
          raw_model_container.add_input(variable)
  
      # Parse the input ONNX model into its topology with the topology.
      _parse_onnx_api(topology, model, inputs)
  
      # The object raw_model_container is a part of the topology we're going to return.
      # We use it to store the output_names of the ONNX graph.
      for o in model.graph.output:
          raw_model_container.add_output(
              topology.declare_logical_variable(o.name)
          )
  
      return topology
  
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 3 for calling a global function with example usage: parse_onnx_api_model(model) and returns: topology