code: def make_dl_datatype(typecode, itemsize):
      code = None
      bits = itemsize * 8
      lanes = 1
      if typecode in "?":
          code = DLDataTypeCode.kDLBool
      if typecode in "bhilqnp":
          code = DLDataTypeCode.kDLInt
      if typecode in "BHILQNP":
          code = DLDataTypeCode.kDLUInt
      if typecode in "efdg":
          code = DLDataTypeCode.kDLFloat
      if typecode in "FDG":
          code = DLDataTypeCode.kDLComplex
      if typecode == "G" and itemsize == 32:
          code = DLDataTypeCode.kDLFloat
          bits //= 2
          lanes *= 2
      datatype = DLDataType()
      datatype.code = code
      datatype.bits = bits
      datatype.lanes = lanes
      return datatype
  
imports: import sys
  import ctypes
  from enum import IntEnum
label_desc: Use image node_id 1 for calling a global function with example usage: make_dl_datatype(typecode, itemsize) and returns: datatype