code: def run_core_ml_predict(proto, input_key_values, use_cpu_only=False):
      model = coremltools.models.MLModel(proto, useCPUOnly=use_cpu_only)
      input_key_values = dict(
          [
              (
                  k,
                  v.astype(np.float32)
                  if not np.isscalar(v) and not v.shape == ()
                  else np.array([v], dtype=np.float32),
              )
              for k, v in input_key_values.items()
          ]
      )
      return model.predict(input_key_values, useCPUOnly=use_cpu_only)
  
imports: import logging
  import numpy
  import copy
  import coremltools
  from coremltools import converters
  from coremltools.converters.mil import converter
  from coremltools.converters.mil.mil import Program, Function
  from coremltools.converters.mil.mil.passes.pass_registry import PASS_REGISTRY
  from coremltools._deps import _IS_MACOS
label_desc: Use image node_id 10 for calling a global function with example usage: run_core_ml_predict(proto, input_key_values, use_cpu_only) and returns: model