code: def testValidInputSpec(self):
      try:
          x = InputSpec(dataType="int", count=4)
          x.invariant()
  
          x = InputSpec(
              description="description",
              dataType="int",
              count=3,
              required=True,
              regionLevel=True,
              isDefaultInput=True,
              requireSplitterMap=True,
          )
          x.invariant()
      except:
          self.fail("Got unexpected exception")
  
file_path: nupic-legacy/tests/unit/nupic/regions/regions_spec_test.py
imports: import unittest2
  from nupic.regions.spec import Spec, InputSpec, OutputSpec, ParameterSpec, CommandSpec
label_desc: Use image node_id 2 for calling the KNNAnomalyClassifierRegionTest obj's underlying member method code with example usage: obj.testValidInputSpec() without return types