class_docstr: Metaclass for Enum
class_docstr_tok: ["Metaclass","for","Enum"]
docstr: Returns the type for creating enum members, and the first inherited
  enum class.
  
  bases: the tuple of bases that was given to __new__
docstr_tok: ["Returns","the","type","for","creating","enum","members",",","and","the","first","inherited","enum","class",".","bases",":","the","tuple","of","bases","that","was","given","to","__new__"]
code: def _get_mixins_(bases):
      """Returns the type for creating enum members, and the first inherited
      enum class.
  
      bases: the tuple of bases that was given to __new__
  
      """
      if not bases or Enum is None:
          return object, Enum
  
      # double check that we are not subclassing a class with existing
      # enumeration members; while we're at it, see if any other data
      # type has been mixed in so we can use the correct __new__
      member_type = first_enum = None
      for base in bases:
          if (
              base is not Enum
              and issubclass(base, Enum)
              and base._member_names_
          ):
              raise TypeError("Cannot extend enumerations")
      # base is now the last base in bases
      if not issubclass(base, Enum):
          raise TypeError(
              "new enumerations must be created as "
              "`ClassName([mixin_type,] enum_type)`"
          )
  
      # get correct mix-in type (either mix-in type of Enum subclass, or
      # first base if last base is Enum)
      if not issubclass(bases[0], Enum):
          member_type = bases[0]  # first data type
          first_enum = bases[-1]  # enum type
      else:
          for base in bases[0].__mro__:
              # most common: (IntEnum, int, Enum, object)
              # possible:    (<Enum 'AutoIntEnum'>, <Enum 'IntEnum'>,
              #               <class 'int'>, <Enum 'Enum'>,
              #               <class 'object'>)
              if issubclass(base, Enum):
                  if first_enum is None:
                      first_enum = base
              else:
                  if member_type is None:
                      member_type = base
  
      return member_type, first_enum
  
imports: import sys
label_desc: Use image node_id 17 for calling the EnumMeta obj's underlying member method code with example usage: obj._get_mixins_(bases) and returns: member_type,  first_enum, object,  Enum