code: def _set_user_inputs(proto, inputs):
      for input_type in inputs:
          shape = input_type.shape
          if isinstance(shape, EnumeratedShapes):
              if isinstance(input_type, ImageType):
                  image_sizes = []
                  if input_type.image_config.channel_first:
                      for s in shape.shapes:
                          image_sizes.append(
                              flexible_shape_utils.NeuralNetworkImageSize(
                                  s.shape[-2], s.shape[-1]
                              )
                          )
                  else:
                      for s in shape.shapes:
                          image_sizes.append(
                              flexible_shape_utils.NeuralNetworkImageSize(
                                  s.shape[-3], s.shape[-2]
                              )
                          )
                  add_enumerated_image_sizes(
                      proto, input_type.name, image_sizes=image_sizes
                  )
              else:
                  add_multiarray_ndshape_enumeration(
                      proto,
                      input_type.name,
                      [tuple(s.shape) for s in shape.shapes],
                  )
          elif isinstance(shape, Shape):
              shape = shape.shape  # This is shape in Shape
              if all(
                  [
                      not isinstance(s, RangeDim)
                      and not is_symbolic(s)
                      and s > 0
                      for s in shape
                  ]
              ):
                  continue
              if isinstance(input_type, ImageType):
                  img_range = (
                      flexible_shape_utils.NeuralNetworkImageSizeRange()
                  )
                  if input_type.channel_first:
                      H = shape[-2]
                      W = shape[-1]
                  else:
                      H = shape[-3]
                      W = shape[-2]
  
                  if isinstance(H, RangeDim):
                      img_range.add_height_range(
                          (H.lower_bound, H.upper_bound)
                      )
                  elif is_symbolic(H):
                      img_range.add_height_range((1, -1))
                  else:
                      img_range.add_height_range((H, H))
                  if isinstance(W, RangeDim):
                      img_range.add_width_range(
                          (W.lower_bound, W.upper_bound)
                      )
                  elif is_symbolic(W):
                      img_range.add_width_range((1, -1))
                  else:
                      img_range.add_width_range((W, W))
  
                  flexible_shape_utils.update_image_size_range(
                      proto, input_type.name, img_range
                  )
              else:
                  lb = []
                  ub = []
                  for s in shape:
                      if isinstance(s, RangeDim):
                          lb.append(s.lower_bound)
                          ub.append(s.upper_bound)
                      elif is_symbolic(s):
                          lb.append(1)
                          ub.append(-1)
                      else:
                          lb.append(s)
                          ub.append(s)
                  set_multiarray_ndshape_range(
                      proto,
                      input_type.name,
                      lower_bounds=lb,
                      upper_bounds=ub,
                  )
  
imports: from __future__ import print_function
  from __future__ import division
  from __future__ import absolute_import
  import logging
  from collections import defaultdict
  from coremltools.converters.mil.input_types import ClassifierConfig, ImageType, EnumeratedShapes, Shape, RangeDim
  from coremltools.models import MLModel
  from coremltools.models import neural_network
  import coremltools.models.datatypes
  from coremltools.converters.mil.mil import types
  from coremltools.converters.mil.mil.types.symbolic import any_symbolic, any_variadic, is_symbolic
  from .op_mapping import convert_ops
  from coremltools.models.neural_network import flexible_shape_utils
  from coremltools.models.neural_network.flexible_shape_utils import update_image_size_range, add_enumerated_image_sizes, set_multiarray_ndshape_range, add_multiarray_ndshape_enumeration
  from .passes.nn_passes import nn_backend_passes
  from coremltools.converters._profile_utils import _profile
label_desc: Use image node_id 3 for calling a global function with example usage: _set_user_inputs(proto, inputs) without return types