class_docstr: This class tests for different I/O feature data types for an .mlmodel
  It will cover the following areas to test for:
  - All features must have a valid type
  - Multiarrays must have a valid dataType. Inputs must specify shape. Shape must have >= 0 elements
  - Images must have a valid colorspace. width & height have to be >= 0
  - Dictionaries must have a valid key type
class_docstr_tok: ["This","class","tests","for","different","I\/O","feature","data","types","for","an",".mlmodel","It","will","cover","the","following","areas","to","test","for",":","-","All","features","must","have","a","valid","type","-","Multiarrays","must","have","a","valid","dataType",".","Inputs","must","specify","shape",".","Shape","must","have",">","=","0","elements","-","Images","must","have","a","valid","colorspace",".","width","&","height","have","to","be",">","=","0","-","Dictionaries","must","have","a","valid","key","type"]
code: def _check_tree_model(self, spec, inputType, outputType, n_out):
      self.assertIsNotNone(spec)
  
      # Test the model class
      self.assertIsNotNone(spec.description)
      self.assertIsNotNone(spec.treeEnsembleClassifier)
  
      # Test the interface class
      self.assertEqual(spec.description.predictedFeatureName, "target")
  
      # Test the inputs and outputs
      self.assertEqual(len(spec.description.output), n_out)
      self.assertEqual(spec.description.output[0].name, "target")
      self.assertEqual(
          spec.description.output[0].type.WhichOneof("Type"), outputType
      )
      self.assertEqual(spec.description.input[0].name, "data")
      self.assertEqual(
          spec.description.input[0].type.WhichOneof("Type"), inputType
      )
  
imports: import coremltools
  from coremltools._deps import _HAS_KERAS2_TF, MSG_KERAS2_NOT_FOUND, _HAS_SKLEARN, MSG_SKLEARN_NOT_FOUND
  from coremltools.models.utils import _macos_version, _is_macos
  import unittest
  import numpy
  import pytest
  import PIL.Image
label_desc: Use image node_id 5 for calling the TestIODataTypes obj's underlying member method code with example usage: obj._check_tree_model(spec, inputType, outputType, n_out) without return types