code: def mil_convert(
      model, convert_from, convert_to, compute_units, **kwargs
  ):
      """
      Convert model from a specified frontend `convert_from` to a specified
      converter backend `convert_to`.
  
      Parameters
      ----------
      model: TF, PyTorch, or `coremltools.converters.mil.Program`.
          See `coremltools.converters.convert`
  
      convert_from: str
          The value must be one of ['tensorflow', 'tensorflow2',
          'pytorch', 'milinternal'] (aka name of a `ConverterRegistry.frontend`).
  
      compute_units: coremltools.ComputeUnit
          A enum with three possible values:
              - coremltools.ComputeUnit.ALL - use all compute units available, including the
                  neural engine.
              - coremltools.ComputeUnit.CPU_ONLY - limit the model to only use the CPU.
              - coremltools.ComputeUnit.CPU_AND_GPU - use both the CPU and GPU, but not the
                  neural engine.
  
      convert_to: str
         Value must be one of ['neuralnetwork', 'mlprogram', 'milinternal']
         See `coremltools.converters.convert`
  
      Returns
      -------
      model: `coremltools.models.MLModel` or
      `coremltools.converters.mil.Program`
          See `coremltools.converters.convert`
      """
      return _mil_convert(
          model,
          convert_from,
          convert_to,
          ConverterRegistry,
          MLModel,
          compute_units,
          **kwargs,
      )
  
imports: import tempfile
  import warnings
  from typing import Optional, Text, Tuple
  from coremltools.converters._profile_utils import _profile
  from coremltools.converters.mil import Program
  from coremltools.converters.mil.mil import Builder
  from coremltools.converters.mil.mil.types.symbolic import k_num_internal_syms, k_used_symbols
  from coremltools.models import MLModel
  from coremltools.models.model import _create_mlpackage
  from .None import ImageType, InputType
  from .mil.passes.pass_pipeline import PassPipeline, PassPipelineManager
label_desc: Use image node_id 2 for calling a global function with example usage: mil_convert(model, convert_from, convert_to, compute_units) and returns: _mil_convert