docstr: Makes sure the ndarray in const has the correct type.
docstr_tok: ["Makes","sure","the","ndarray","in","const","has","the","correct","type","."]
code: def test_const_type(self, compute_unit, backend, dtype):
      """Makes sure the ndarray in const has the correct type."""
  
      @mb.program(input_specs=[], opset_version=backend.opset_version)
      def prog():
          return mb.const(
              val=np.random.randint(0, 5, (4, 2)).astype(dtype)
          )
  
      const_op = prog.functions["main"].find_ops(op_type="const")[0]
  
      if dtype == np.int64:
          target_dtype = np.int32
      elif dtype == np.float64:
          target_dtype = np.float32
      else:
          target_dtype = dtype
      assert const_op.outputs[
          0
      ].dtype == types.numpy_type_to_builtin_type(target_dtype)
  
imports: import itertools
  import numpy
  import pytest
  from coremltools.converters.mil.mil import Builder
  from coremltools.converters.mil.mil import get_new_symbol, types
  from coremltools.converters.mil.mil.ops.tests.iOS14 import backends
  from coremltools.converters.mil.mil.ops.tests.testing_utils import UNK_SYM, construct_inputs_from_placeholders, run_compare_builder
  from coremltools.converters.mil.testing_reqs import compute_units
  from coremltools.converters.mil.testing_utils import random_gen, ssa_fn
label_desc: Use image node_id 2 for calling the TestConst obj's underlying member method code with example usage: obj.test_const_type(compute_unit, backend, dtype) and returns: mb