code: def check_model(
      model: Union[ModelProto, str, bytes], full_check: bool = False
  ) -> None:
      """Check the consistency of a model. An exception is raised if the test fails.
  
      Arguments:
          model (ModelProto): model to check
          full_check (bool): if True, the function checks shapes can be inferred
      """
      # If model is a path instead of ModelProto
      if isinstance(model, str):
          C.check_model_path(model, full_check)
      else:
          protobuf_string = (
              model
              if isinstance(model, bytes)
              else model.SerializeToString()
          )
          # If the protobuf is larger than 2GB,
          # remind users should use the model path to check
          if sys.getsizeof(protobuf_string) > MAXIMUM_PROTOBUF:
              raise ValueError(
                  "This protobuf of onnx model is too large (>2GB). Call check_model with model path instead."
              )
          C.check_model(protobuf_string, full_check)
  
file_path: catboost/contrib/libs/onnx/onnx/checker.py
imports: import functools
  import sys
  from typing import Any, Callable, Optional, Type, TypeVar, Union, cast
  from google.protobuf.message import Message
  import onnx.defs
  from onnx.onnx_cpp2py_export import checker
  import onnx.shape_inference
  from onnx import IR_VERSION, AttributeProto, FunctionProto, GraphProto, ModelProto, NodeProto, SparseTensorProto, TensorProto, ValueInfoProto, helper
label_desc: Use image node_id 9 for calling a global function with example usage: check_model(model, full_check) without return types