code: def _get_colorspace_enum(color_layout):
      if color_layout == ColorLayout.GRAYSCALE:
          return ft.ImageFeatureType.ColorSpace.GRAYSCALE
      elif color_layout == ColorLayout.GRAYSCALE_FLOAT16:
          return ft.ImageFeatureType.ColorSpace.GRAYSCALE_FLOAT16
      elif color_layout == ColorLayout.BGR:
          return ft.ImageFeatureType.ColorSpace.BGR
      else:
          return ft.ImageFeatureType.ColorSpace.RGB
  
imports: from coremltools.converters.mil.input_types import ColorLayout
  from coremltools.converters.mil.mil.passes.defs.preprocess import NameSanitizer
  from coremltools.proto import FeatureTypes_pb2
label_desc: Use image node_id 2 for calling a global function with example usage: _get_colorspace_enum(color_layout) and returns: ft, ft, ft, ft