code: def _check_dtype(val):  # type: ignore
      a = val.dtype
      if not isinstance(a, np.dtype) and a not in {
          bfloat16,
          float8e4m3fn,
          float8e4m3fnuz,
          float8e5m2,
          float8e5m2fnuz,
          uint4,
          int4,
          np.int8,
          np.uint8,
          np.float16,
          np.float32,
          np.float64,
          np.int32,
          np.int64,
          np.int16,
          np.uint16,
          np.uint32,
          np.bool_,
          np.str_,
          np.uint64,
          bool,
          str,
      }:
          raise TypeError(
              f"Type ({a}, {type(a)}) is not a numpy type (operator 'Constant')"
          )
  
imports: import numpy
  from onnx.reference.custom_element_types import bfloat16, float8e4m3fn, float8e4m3fnuz, float8e5m2, float8e5m2fnuz, int4, uint4
  from onnx.reference.op_run import OpRun, RefAttrName
label_desc: Use image node_id 1 for calling a global function with example usage: _check_dtype(val) without return types