code: def EnumType(enum_class, nested_type=_Undefined, **kwargs):
      
  
      if nested_type is _Undefined:
          return EnumCDataType(enum_class, **kwargs)
      if isinstance(nested_type, AbstractCDataType):
          return EnumCDataType(enum_class, nested_type, **kwargs)
      else:
          return EnumElementType(enum_class, nested_type, **kwargs)
docs: Create and return a :class:`EnumCDataType` or :class:`EnumElementType`,
      depending on the type of `nested_type`.
  
      If `nested_type` is a :class:`AbstractCDataType` or omitted, a
      :class:`EnumCDataType` is constructed. Otherwise, :class:`EnumElementType`
      is used.
  
      The arguments are forwarded to the respective class’ constructor.
  
      .. versionadded:: 0.10
  
      .. deprecated:: 0.10
  
          This function was introduced to ease the transition in 0.10 from
          a unified :class:`EnumType` to split :class:`EnumCDataType` and
          :class:`EnumElementType`.
  
          It will be removed in 1.0.