code: def make_model(graph: GraphProto, **kwargs: Any) -> ModelProto:
      """Construct a ModelProto
  
      Arguments:
          graph (GraphProto): *make_graph* returns
          **kwargs: any attribute to add to the returned instance
      Returns:
          ModelProto
      """
      model = ModelProto()
      # Touch model.ir_version so it is stored as the version from which it is
      # generated.
      model.ir_version = IR_VERSION
      model.graph.CopyFrom(graph)
  
      opset_imports: Optional[Sequence[OperatorSetIdProto]] = None
      opset_imports = kwargs.pop("opset_imports", None)  # type: ignore
      if opset_imports is not None:
          model.opset_import.extend(opset_imports)
      else:
          # Default import
          imp = model.opset_import.add()
          imp.version = defs.onnx_opset_version()
  
      functions: Optional[Sequence[FunctionProto]] = None
      functions = kwargs.pop("functions", None)  # type: ignore
      if functions is not None:
          model.functions.extend(functions)
  
      for k, v in kwargs.items():
          # TODO: Does this work with repeated fields?
          setattr(model, k, v)
      return model
  
imports: import collections.abc
  import numbers
  import struct
  from cmath import isnan
  from typing import Any, Callable, Dict, KeysView, List, Optional, Sequence, Tuple, TypeVar, Union, cast
  import google.protobuf.message
  import numpy
  from onnx import IR_VERSION, AttributeProto, FunctionProto, GraphProto, MapProto, ModelProto, NodeProto, OperatorSetIdProto, OptionalProto, SequenceProto, SparseTensorProto, TensorProto, TensorShapeProto, TrainingInfoProto, TypeProto, ValueInfoProto, defs, mapping
label_desc: Use image node_id 8 for calling a global function with example usage: make_model(graph) and returns: model