code: def _convert_to_classifier(
      proto, classifier_config, skip_model_load=False
  ):
      tmp_model = MLModel(proto, skip_model_load=skip_model_load)
      tmp_model = neural_network.utils.make_nn_classifier(
          tmp_model,
          classifier_config.class_labels,
          classifier_config.predicted_feature_name,
          classifier_config.predicted_probabilities_output,
      )
      return tmp_model.get_spec()
  
file_path: coremltools/coremltools/converters/mil/backend/nn/load.py
imports: import coremltools
  from coremltools.converters._profile_utils import _profile
  from coremltools.converters.mil.backend.backend_helper import _get_probability_var_for_classifier
  from coremltools.converters.mil.input_types import ColorLayout, EnumeratedShapes, ImageType, RangeDim, Shape
  from coremltools.converters.mil.mil import types
  from coremltools.converters.mil.mil.types.symbolic import any_symbolic, any_variadic, is_symbolic
  from coremltools.models import MLModel
  from coremltools.models import neural_network
  from coremltools.models.datatypes import Array
  from coremltools.models.neural_network import flexible_shape_utils
  from coremltools.models.neural_network.flexible_shape_utils import add_enumerated_image_sizes, add_multiarray_ndshape_enumeration, set_multiarray_ndshape_range
  from ..backend_helper import _get_colorspace_enum, _validate_image_input_output_shapes
  from .op_mapping import convert_ops
label_desc: Use image node_id 2 for calling a global function with example usage: _convert_to_classifier(proto, classifier_config, skip_model_load) and returns: tmp_model