code: def check_function(
      function: FunctionProto,
      ctx: C.CheckerContext | None = None,
      lexical_scope_ctx: C.LexicalScopeContext = LEXICAL_SCOPE_CONTEXT,
  ) -> None:
      _ensure_proto_type(function, FunctionProto)
      if ctx is None:
          ctx = C.CheckerContext()
          ctx.ir_version = onnx.helper.find_min_ir_version_for(
              function.opset_import, ignore_unknown=True
          )
          ctx.opset_imports = {
              domain_version.domain: domain_version.version
              for domain_version in function.opset_import
          }
      C.check_function(
          function.SerializeToString(), ctx, lexical_scope_ctx
      )
  
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 6 for calling a global function with example usage: check_function(function, ctx, lexical_scope_ctx) without return types