code: def types_to_proto_primitive(valuetype):
      if valuetype not in BUILTIN_TO_PROTO_TYPES:
          additional_error_msg = ""
          if valuetype in (types.complex64, types.complex128):
              additional_error_msg = (
                  "(MIL doesn't support complex data as model's output, please extract real and "
                  "imaginary parts explicitly.) "
              )
          raise ValueError(
              f"Unknown map from SSA type {valuetype} to Proto type. {additional_error_msg}"
          )
      return BUILTIN_TO_PROTO_TYPES[valuetype]
  
imports: import os
  import numpy
  import coremltools.proto.FeatureTypes_pb2
  import coremltools.proto.MIL_pb2
  from coremltools.converters.mil.mil import types
  from coremltools.converters.mil.mil.types import BUILTIN_TO_PROTO_TYPES, builtin_to_string, numpy_type_to_builtin_type, type_to_builtin_type
  from coremltools.converters.mil.mil.types.type_mapping import np_val_to_py_type
  from coremltools.models.utils import _WEIGHTS_DIR_NAME, _WEIGHTS_FILE_NAME
label_desc: Use image node_id 15 for calling a global function with example usage: types_to_proto_primitive(valuetype) and returns: BUILTIN_TO_PROTO_TYPES