code: def check_deployment_compatibility(
      spec, representation, deployment_target
  ):
      if not isinstance(deployment_target, AvailableTarget):
          raise TypeError(
              "Argument for deployment_target must be an enumeration from Enum class AvailableTarget"
          )
  
      for any_target in AvailableTarget:
          if (
              any_target > deployment_target
              and any_target in _get_features_associated_with
          ):
              missing_features = _get_features_associated_with[
                  any_target
              ](spec)
  
              if missing_features:
                  msg = (
                      "Provided minimum deployment target requires model to be of version {} but converted model "
                      "uses following features which are available from version {} onwards. Please use a higher "
                      "minimum deployment target to convert. \n ".format(
                          deployment_target.value, any_target.value
                      )
                  )
  
                  for i, feature in enumerate(missing_features):
                      msg += "   {}. {}\n".format(i + 1, feature)
  
                  raise ValueError(msg)
  
      # Default exception throwing if not able to find the reason behind spec version bump
      if spec.specificationVersion > deployment_target.value:
          msg = (
              "Provided deployment target requires model to be of version {} but converted model has version {} "
              "suitable for later releases".format(
                  deployment_target.value,
                  spec.specificationVersion,
              )
          )
          raise ValueError(msg)
  
file_path: coremltools/coremltools/converters/mil/_deployment_compatibility.py
imports: from enum import IntEnum
  from coremltools import _SPECIFICATION_VERSION_IOS_13, _SPECIFICATION_VERSION_IOS_14, _SPECIFICATION_VERSION_IOS_15, _SPECIFICATION_VERSION_IOS_16, _SPECIFICATION_VERSION_IOS_17
label_desc: Use image node_id 3 for calling a global function with example usage: check_deployment_compatibility(spec, representation, deployment_target) without return types