code: def _to_crypten(onnx_model):
      """
      Function that converts an `onnx_model` to a CrypTen model.
      """
  
      # create graph:
      input_names, output_names = _get_input_output_names(onnx_model)
      assert (
          len(output_names) == 1
      ), "Only one output per model supported."
      crypten_model = module.Graph(input_names, output_names[0])
  
      # create nodes for the parameters:
      for node in onnx_model.graph.initializer:
          param = torch.from_numpy(numpy_helper.to_array(node))
          crypten_model.add_module(
              node.name, module.Parameter(param), []
          )
  
      # loop over all nodes:
      for node in onnx_model.graph.node:
          # get attributes and node type:
          attributes = {
              attr.name: _get_attribute_value(attr)
              for attr in node.attribute
          }
          crypten_class = _get_operator_class(node.op_type, attributes)
  
          # add CrypTen module to graph:
          crypten_module = crypten_class.from_onnx(
              attributes=attributes
          )
          input_names = list(node.input)
          output_names = list(node.output)
          if node.op_type == "Dropout":
              output_names = [
                  output_names[0]
              ]  # do not output Dropout mask
          crypten_model.add_module(
              output_names[0],
              crypten_module,
              input_names,
              output_names=output_names,
          )
  
      # return final model:
      crypten_model = _get_model_or_module(crypten_model)
      return crypten_model
  
imports: import copy
  import io
  import onnx
  import torch
  import torch.onnx.symbolic_helper
  import torch.onnx.utils
  from onnx import numpy_helper
  from torch.onnx import OperatorExportTypes
  from .None import module
label_desc: Use image node_id 6 for calling a global function with example usage: _to_crypten(onnx_model) and returns: crypten_model