code: def test_linear(self):
      inputs = [ct.TensorType(name="data", shape=(10, 2))]
      input_data = [torch.rand(*i.shape.to_list()) for i in inputs]
      torchmodel = torch.jit.trace(
          torch.nn.Linear(in_features=2, out_features=3, bias=True),
          input_data,
      )
  
      mlmodel = ct.convert(
          torchmodel,
          inputs=inputs,
          convert_to="mlprogram",
          compute_units=ComputeUnit.CPU_ONLY,
      )
      input_values = {
          i.name: val.detach().numpy()
          for i, val in zip(inputs, input_data)
      }
      roundtrip_and_compare_mlmodel(mlmodel, input_values)
  
imports: import numpy
  import pytest
  import coremltools
  from coremltools import ComputeUnit
  from coremltools._deps import _HAS_TF_2, _HAS_TORCH
  from coremltools.converters._converters_entry import _get_metadata_from_mlmodel
  from coremltools.converters.mil import Builder
  from coremltools.converters.mil.converter import mil_convert
  from coremltools.converters.mil.frontend.milproto.load import load
  from coremltools.converters.mil.frontend.tensorflow.test.test_ops import TestTensorArray
  from coremltools.converters.mil.frontend.tensorflow.test.testing_utils import run_compare_tf
  from coremltools.converters.mil.mil.ops.tests.testing_utils import compare_backend
  from coremltools.converters.mil.testing_utils import get_op_names_in_program, get_op_types_in_program
label_desc: Use image node_id 2 for calling the TestE2ENumericalCorrectness obj's underlying member method code with example usage: obj.test_linear() without return types