code: def get_pymil_prog_from_mlmodel(mlmodel):
      model_spec = mlmodel.get_spec()
      return milproto_to_pymil(
          model_spec=model_spec,
          specification_version=model_spec.specificationVersion,
          file_weights_dir=mlmodel.weights_dir,
      )
  
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 1 for calling a global function with example usage: get_pymil_prog_from_mlmodel(mlmodel) and returns: milproto_to_pymil