code: def test_mil_proto_preserving_ops_name(self):
      # This test is checking the route source_model -> MIL -> mil_prot -> pymil is preserving the op name
      # Define a PyMIL program
      @mb.program(
          input_specs=[
              mb.TensorSpec(shape=(1, 3, 100, 100)),
          ]
      )
      def prog(x):
          # MIL operation takes named inputs (instead of positional inputs).
          # Here `name` argument is optional.
          x = mb.relu(x=x, name="i_am_relu")
          x = mb.conv(
              x=x, weight=np.random.rand(10, 3, 2, 2), name="i_am_conv"
          )
          x = mb.transpose(
              x=x, perm=[0, 3, 1, 2], name="i_am_transpose"
          )
          x = mb.reduce_mean(
              x=x, axes=[2, 3], keep_dims=False, name="i_am_reduce_mean"
          )
          x = mb.log(x=x, name="i_am_log")
          return x
  
      mlmodel = ct.convert(
          prog,
          convert_to="mlprogram",
          compute_units=ct.ComputeUnit.CPU_ONLY,
      )
      op_names = get_op_names_in_program(
          mlmodel._mil_program, skip_const_ops=False
      )
  
      prog = get_pymil_prog_from_mlmodel(mlmodel)
      new_op_names = get_op_names_in_program(prog, skip_const_ops=False)
  
      assert op_names == new_op_names
  
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 3 for calling the TestLoadAPIUsage obj's underlying member method code with example usage: obj.test_mil_proto_preserving_ops_name() and returns: x