code: def extract_model(
      self,
      input_names: List[str],
      output_names: List[str],
  ) -> ModelProto:
      inputs = self._collect_new_inputs(input_names)
      outputs = self._collect_new_outputs(output_names)
      nodes = self._collect_reachable_nodes(input_names, output_names)
      initializer, value_info = self._collect_reachable_tensors(nodes)
      local_functions = self._collect_referred_local_functions(nodes)
      model = self._make_model(
          nodes,
          inputs,
          outputs,
          initializer,
          value_info,
          local_functions,
      )
  
      return model
  
file_path: catboost/contrib/libs/onnx/onnx/utils.py
imports: import os
  from typing import List, Tuple
  import onnx.checker
  import onnx.helper
  import onnx.shape_inference
  from onnx import FunctionProto, ModelProto, NodeProto, TensorProto, ValueInfoProto
label_desc: Use image node_id 11 for calling the Extractor obj's underlying member method code with example usage: obj.extract_model(input_names, output_names) and returns: model