class_docstr: TensorInputType specifies the generic tensor inputs.
  The `type_domain` validates data type constraints, and it could be either
  (1) A object / tuple of builtin types:
      This puts constraint on the allowed inputs data type.
      For example:
  
      ```
      input_spec = InputSpec(
         x=TensorInputType(type_domain=types.int32),
      )
      ```
      only allows input `x` have int32 dtype.
  
      ```
      input_spec = InputSpec(
         x=TensorInputType(type_domain=(types.int32, types.fp16)),
      )
      ```
      allows input `x` be either type of int32 or float16
  
  (2) string:
      Verify different input parameters binding with the same `type_domain` are the same data type.
      This additional check is done by defining a `type_domains` dictionary in the Operation class
      For example:
  
      ```
      class conv(Operation):
          input_spec = InputSpec(
              x=TensorInputType(type_domain="T"),
              weight=TensorInputType(type_domain="T"),
          )
  
          type_domains = {
              "T": (types.fp16, types.fp32),
          }
      ```
      would verify:
      (i) `x` and `weight` are one of the float16 or float32 type.
      (ii) `x` and `weight` are the same type.
class_docstr_tok: ["TensorInputType","specifies","the","generic","tensor","inputs",".","The","`","type_domain","`","validates","data","type","constraints",",","and","it","could","be","either","(","1",")","A","object","\/","tuple","of","builtin","types",":","This","puts","constraint","on","the","allowed","inputs","data","type",".","For","example",":","``","`","input_spec","=","InputSpec","(","x=TensorInputType","(","type_domain=types.int32",")",",",")","``","`","only","allows","input","`","x","`","have","int32","dtype",".","``","`","input_spec","=","InputSpec","(","x=TensorInputType","(","type_domain=","(","types.int32",",","types.fp16",")",")",",",")","``","`","allows","input","`","x","`","be","either","type","of","int32","or","float16","(","2",")","string",":","Verify","different","input","parameters","binding","with","the","same","`","type_domain","`","are","the","same","data","type",".","This","additional","check","is","done","by","defining","a","`","type_domains","`","dictionary","in","the","Operation","class","For","example",":","``","`","class","conv","(","Operation",")",":","input_spec","=","InputSpec","(","x=TensorInputType","(","type_domain=","''","T","''",")",",","weight=TensorInputType","(","type_domain=","''","T","''",")",",",")","type_domains","=","{","``","T","''",":","(","types.fp16",",","types.fp32",")",",","}","``","`","would","verify",":","(","i",")","`","x","`","and","`","weight","`","are","one","of","the","float16","or","float32","type",".","(","ii",")","`","x","`","and","`","weight","`","are","the","same","type","."]
code: def type_domain_id(self):
      return self._type_domain_id
  
imports: from collections import OrderedDict
  from coremltools.converters.mil.mil import types
  from coremltools.converters.mil.mil.var import InternalVar
label_desc: Use image node_id 5 for calling the TensorInputType obj's underlying member method code with example usage: obj.type_domain_id() and returns: self