code: def check_kind(t, mod=None):
      """Check that the type is well kinded and return the kind.
      For example, this mean type cannot has tensor of tensor, or is a tuple type
      of 2 shapes.
  
      Parameters
      ----------
      t : tvm.relay.Type
          The type to check
  
      mod : Optional[tvm.IRModule]
          The global module.
  
      Returns
      -------
      kind : Kind
          the kind of t
  
      Examples
      --------
      .. code:: python
  
          assert check_kind(relay.TupleType([relay.TypeParam('tp1', relay.Kind.Shape)])) == Shape
          assert check_kind(relay.TupleType([relay.TypeParam('tp1', relay.Kind.Type)])) == Type
      """
      if mod is not None:
          return _ffi_api.check_kind(t, mod)
      else:
          return _ffi_api.check_kind(t)
  
imports: from ...ir import IRModule
  from ...relay import transform, build_module
  from ...runtime.ndarray import cpu
  from .None import _ffi_api
  from .feature import Feature
label_desc: Use image node_id 3 for calling a global function with example usage: check_kind(t, mod) and returns: _ffi_api, _ffi_api