code: def decompress_weights(mlmodel: _MLModel):
      """
      Utility function to convert weights that are sparse or palettized or affine quantized, back to the float format.
      That is, convert any of the following three ops to ``mb.const``:
  
      (1) ``constexpr_affine_dequantize``
      (2) ``constexpr_lut_to_dense``
      (3) ``constexpr_sparse_to_dense``
  
      Parameters
      ----------
      mlmodel: MLModel
          Model which will be decompressed.
  
      Returns
      -------
      model: MLModel
          The MLModel with no ``constexpr`` ops included.
  
      Examples
      --------
      .. sourcecode:: python
  
          import coremltools as ct
  
          model = ct.models.MLModel("my_compressed_model.mlpackage")
          decompressed_model = ct.optimize.coreml.decompress_weights(model)
  
      """
  
      weight_decompressor = _WeightDecompressor(
          op_selector=lambda op: True
      )
      return _apply_graph_pass(mlmodel, weight_decompressor)
  
imports: from collections import OrderedDict
  from typing import Callable, Dict, List, Optional
  import numpy
  from attrs import define, field, validators
  from tqdm import tqdm
  from coremltools import _SPECIFICATION_VERSION_IOS_16
  from coremltools.converters.mil.converter import mil_convert
  from coremltools.converters.mil.frontend.milproto import load
  from coremltools.converters.mil.mil.passes.defs.quantization import AbstractQuantizationPass
  from coremltools.models import MLModel
  from coremltools.optimize.coreml import OptimizationConfig
  from coremltools.optimize.coreml._config import _MetaDataDict
  from ._quantization_passes import WeightDecompressor
  from ._quantization_passes import linear_quantize_weights
  from ._quantization_passes import palettize_weights
  from ._quantization_passes import prune_weights
label_desc: Use image node_id 7 for calling a global function with example usage: decompress_weights(mlmodel) and returns: _apply_graph_pass