code: def check_onnx_model(
      onnx_model, external_converters, external_opset_imports
  ):
      try:
          checker.check_model(onnx_model)
      except onnx.checker.ValidationError as e:
          if external_converters is None:
              raise e
          else:
              # ONNX version >= 1.5: default checker skips schema check when
              # non standard domain is set. In ONNX-Chainer, external ops without
              # doamin is also accepted, but show warning.
              # ONNX version < 1.5: the checker does not skip schema check
              # regardless domain is set or not. In ONNX-Chainer, ignore
              # errors when external ops are set.
              if is_support_non_standard_domain():
                  if external_opset_imports:
                      raise e
                  else:
                      warnings.warn(
                          "ValidationError is occurred but ignored. "
                          "ONNX-Chainer recommends to set "
                          "`external_opset_imports` when using "
                          "`external_converters` on exporting. Please take care "
                          "about ONNX format check is insufficient. Error "
                          "message:\n{}".format(str(e)),
                          UserWarning,
                      )
              else:
                  warnings.warn(
                      "ValidationError is occurred but ignored because "
                      "exporting with `external_converters`. Please take care "
                      "about ONNX format check is insufficient. Error "
                      "message:\n{}".format(str(e)),
                      UserWarning,
                  )
  
file_path: chainer/onnx_chainer/export.py
imports: from __future__ import print_function
  from collections import OrderedDict
  import warnings
  import chainer
label_desc: Use image node_id 7 for calling a global function with example usage: check_onnx_model(onnx_model, external_converters, external_opset_imports) without return types