parameters: (bases)
return_statement: return member_type, first_enum
docstring: Returns the type for creating enum members, and the first inherited
          enum class.
  
          bases: the tuple of bases that was given to __new__
docstring_summary: Returns the type for creating enum members, and the first inherited
          enum class.
docstring_tokens: Returns the type for creating enum members and the first inherited enum class .
function: 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:
              return object, Enum
  
          def _find_data_type(bases):
              for chain in bases:
                  for base in chain.__mro__:
                      if base is object:
                          continue
                      elif '__new__' in base.__dict__:
                          if issubclass(base, Enum):
                              continue
                          return base
  
          # ensure final parent class is an Enum derivative, find any concrete
          # data type, and check that Enum has no members
          first_enum = bases[-1]
          if not issubclass(first_enum, Enum):
              raise TypeError("new enumerations should be created as "
                      "`EnumName([mixin_type, ...] [data_type,] enum_type)`")
          member_type = _find_data_type(bases) or object
          if first_enum._member_names_:
              raise TypeError("Cannot extend enumerations")
          return member_type, first_enum
function_tokens: def _get_mixins_ ( bases ) : if not bases : return object , Enum def _find_data_type ( bases ) : for chain in bases : for base in chain . __mro__ : if base is object : continue elif '__new__' in base . __dict__ : if issubclass ( base , Enum ) : continue return base # ensure final parent class is an Enum derivative, find any concrete # data type, and check that Enum has no members first_enum = bases [ - 1 ] if not issubclass ( first_enum , Enum ) : raise TypeError ( "new enumerations should be created as " "`EnumName([mixin_type, ...] [data_type,] enum_type)`" ) member_type = _find_data_type ( bases ) or object if first_enum . _member_names_ : raise TypeError ( "Cannot extend enumerations" ) return member_type , first_enum