code: def _ensure_proto_type(
      proto: Message, proto_type: type[Message]
  ) -> None:
      if not isinstance(proto, proto_type):
          raise TypeError(
              f"The proto message needs to be of type '{proto_type.__name__}'"
          )
  
file_path: onnx/onnx/checker.py
imports: from __future__ import annotations
  import os
  import sys
  from typing import Any, Callable, TypeVar
  from google.protobuf.message import Message
  import onnx.defs
  import onnx.onnx_cpp2py_export.checker
  import onnx.shape_inference
  from onnx import IR_VERSION, AttributeProto, FunctionProto, GraphProto, ModelProto, NodeProto, SparseTensorProto, TensorProto, ValueInfoProto
label_desc: Use image node_id 1 for calling a global function with example usage: _ensure_proto_type(proto, proto_type) without return types