code: def test_linear_ios17_mixed_precision(
      self, compute_unit, backend, x_dtype, weight_bias_dtype
  ):
      if x_dtype == np.int32:
          pytest.xfail(
              "Linear op doesn't work with int32 input (rdar://111421695)"
          )
  
      out_channels = 3
      x_shape = np.random.randint(low=1, high=3, size=(3,))
      w_shape = np.array([out_channels, x_shape[-1]])
      b_shape = np.array([out_channels])
  
      x_val = np.random.randint(low=0, high=10, size=x_shape).astype(
          x_dtype
      )
      weight_val = np.random.randint(
          low=0, high=10, size=w_shape
      ).astype(weight_bias_dtype)
      bias_val = np.random.randint(low=0, high=10, size=b_shape).astype(
          weight_bias_dtype
      )
  
      x_builtin_dtype = numpy_type_to_builtin_type(x_dtype)
      input_placeholders = {
          "x": mb.placeholder(shape=x_val.shape, dtype=x_builtin_dtype),
      }
  
      def build(x):
          return mb.linear(x=x, weight=weight_val, bias=bias_val)
  
      expected_outputs = (
          np.matmul(x_val, np.transpose(weight_val)) + bias_val
      )
      run_compare_builder(
          build,
          input_placeholders,
          input_values={"x": x_val},
          expected_output_types=expected_outputs.shape
          + (x_builtin_dtype,),
          expected_outputs=expected_outputs,
          compute_unit=compute_unit,
          backend=backend,
      )
  
file_path: coremltools/coremltools/converters/mil/mil/ops/tests/iOS17/test_linear.py
imports: import itertools
  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.iOS17 import backends
  from coremltools.converters.mil.mil.ops.tests.testing_utils import run_compare_builder
  from coremltools.converters.mil.mil.types import builtin_to_string, nptype_from_builtin
  from coremltools.converters.mil.mil.types.type_mapping import numpy_type_to_builtin_type
  from coremltools.converters.mil.testing_reqs import compute_units
label_desc: Use image node_id 1 for calling the TestLinear obj's underlying member method code with example usage: obj.test_linear_ios17_mixed_precision(compute_unit, backend, x_dtype, weight_bias_dtype) and returns: mb