code: def _convert_to_image_input(proto, inputs, skip_model_load=False):
      tmp_model = MLModel(proto, skip_model_load=skip_model_load)
      for input_type in inputs:
          if isinstance(input_type, ImageType):
              if input_type.color_layout in (
                  ColorLayout.GRAYSCALE,
                  ColorLayout.GRAYSCALE_FLOAT16,
              ):
                  gray_bias = input_type.bias
                  red_bias, green_bias, blue_bias = 0.0, 0.0, 0.0
              elif input_type.color_layout == ColorLayout.RGB:
                  gray_bias = 0.0
                  red_bias, green_bias, blue_bias = input_type.bias
              elif input_type.color_layout == ColorLayout.BGR:
                  gray_bias = 0.0
                  blue_bias, green_bias, red_bias = input_type.bias
              tmp_model = neural_network.utils.make_image_input(
                  tmp_model,
                  input_type.name,
                  is_bgr=input_type.color_layout == ColorLayout.BGR,
                  image_format="NCHW"
                  if input_type.channel_first
                  else "NHWC",
                  red_bias=red_bias,
                  green_bias=green_bias,
                  blue_bias=blue_bias,
                  gray_bias=gray_bias,
                  scale=input_type.scale,
              )
      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 1 for calling a global function with example usage: _convert_to_image_input(proto, inputs, skip_model_load) and returns: tmp_model