def get_coreml_model(
        self,
        input: Dict[str, List["proto.Model_pb2.FeatureDescription"]],
        output: Dict[str, List["proto.Model_pb2.FeatureDescription"]],
        specification_version: int,
    ) -> "proto.Model_pb2.Model":
        """
        Utils to get a coreml model description.
        For the multifunction export, we utilize the FunctionDescription proto message.
        """
        if self.export_as_multifunction:
            # For multifunction export, we use the FunctionDescription
            if specification_version < _SPECIFICATION_VERSION_IOS_18:
                raise ValueError(
                    "minimum_deployment_target for multi-functions export should be iOS18+."
                )

            if self.classifier_config is not None:
                # TODO: This should be fixed in rdar://123660416 ([New Feature][Multi-functions] Enable classifier for multi-functions CoreML model)
                raise NotImplementedError("classifier model not supported in multi-functions export.")

            function_desc = []
            for func_name in input.keys():
                state_features, non_state_input_features = self._decouple_state_and_input(
                    input[func_name]
                )
                desc = proto.Model_pb2.FunctionDescription(
                    name=func_name,
                    input=non_state_input_features,
                    output=output[func_name],
                    state=state_features,
                )
                function_desc.append(desc)

            desc = proto.Model_pb2.ModelDescription(
                functions=function_desc,
                defaultFunctionName=self.prog.default_function_name,
            )

        else:
            # single function export
            input_features = input[self.prog.default_function_name]
            output_features = output[self.prog.default_function_name]
            state_features, non_state_input_features = self._decouple_state_and_input(
                input_features
            )

            desc = proto.Model_pb2.ModelDescription(
                input=non_state_input_features,
                output=output_features,
                state=state_features,
            )

            if self.classifier_config is not None:
                desc.predictedFeatureName = self.predicted_feature_name
                desc.predictedProbabilitiesName = self.predicted_probabilities_name

                # Manually edit output type of predictedFeatureName.
                # It doesn't use MLMultiArray and really uses a "primitive" type.
                for output in desc.output:
                    if output.name == self.predicted_feature_name:
                        if type(self.classifier_config.class_labels[0]) == int:
                            output.type.int64Type.MergeFromString(b"")
                        else:
                            output.type.stringType.MergeFromString(b"")
                        break

        # Create ML Model
        model = proto.Model_pb2.Model(description=desc, specificationVersion=specification_version)
        model.mlProgram.CopyFrom(self.mil_proto)

        return model

        Utils to get a coreml model description.
        For the multifunction export, we utilize the FunctionDescription proto message.
        
coremltools/converters/mil/backend/mil/load.py