code: def test_builder_eval_cast_ios17(
      self, compute_unit, backend, src_dtype, dst_dtype
  ):
      x = np.array([[1, 2, 3], [4, 5, 6]], dtype=src_dtype)
      dst_dtype_str = types.builtin_to_string(
          numpy_type_to_builtin_type(dst_dtype)
      )
      expected_res = x.astype(dtype=np.float16)
  
      @mb.program(input_specs=[], opset_version=backend.opset_version)
      def prog():
          return mb.cast(x=x, dtype=dst_dtype_str)
  
      main_func = prog.functions["main"]
      cast_op = main_func.find_ops(op_type="cast")[0]
      np.testing.assert_allclose(
          expected_res, cast_op.outputs[0].val, atol=1e-04, rtol=1e-05
      )
  
file_path: coremltools/coremltools/converters/mil/mil/ops/tests/iOS17/test_elementwise_unary.py
imports: import itertools
  from unittest.mock import patch
  import numpy
  import pytest
  import coremltools
  from coremltools.converters.mil.mil import Builder
  from coremltools.converters.mil.mil import types
  from coremltools.converters.mil.mil.ops.tests.iOS14.test_elementwise_unary import TestElementwiseUnary
  from coremltools.converters.mil.mil.ops.tests.iOS17 import backends
  from coremltools.converters.mil.mil.ops.tests.testing_utils import run_compare_builder
  from coremltools.converters.mil.mil.passes.pass_pipeline import PassPipeline
  from coremltools.converters.mil.mil.types.type_mapping import numpy_type_to_builtin_type
  from coremltools.converters.mil.mil.var import Var
  from coremltools.converters.mil.testing_reqs import compute_units
  from coremltools.converters.mil.testing_utils import get_op_types_in_program
label_desc: Use image node_id 1 for calling the TestElementwiseUnary obj's underlying member method code with example usage: obj.test_builder_eval_cast_ios17(compute_unit, backend, src_dtype, dst_dtype) and returns: mb