def _sanitize_and_check(indexes):
kinds = list({type(index) for index in indexes})<EOL>if list in kinds:<EOL><INDENT>if len(kinds) > <NUM_LIT:1>:<EOL><INDENT>indexes = [Index(com.try_sort(x))<EOL>if not isinstance(x, Index) else<EOL>x for x in indexes]<EOL>kinds.remove(list)<EOL><DEDENT>else:<EOL><INDENT>return indexes, '<STR_LIT:list>'<EOL><DEDENT><DEDENT>if len(kinds) > <NUM_LIT:1> or Index not in kinds:<EOL><INDENT>return indexes, '<STR_LIT>'<EOL><DEDENT>else:<EOL><INDENT>return indexes, '<STR_LIT>'<EOL><DEDENT>
Verify the type of indexes and convert lists to Index.

Cases:

- [list, list, ...]: Return ([list, list, ...], 'list')
- [list, Index, ...]: Return _sanitize_and_check([Index, Index, ...])
    Lists are sorted and converted to Index.
- [Index, Index, ...]: Return ([Index, Index, ...], TYPE)
    TYPE = 'special' if at least one special type, 'array' otherwise.

Parameters
----------
indexes : list of Index or list objects

Returns
-------
sanitized_indexes : list of Index or list objects
type : {'list', 'array', 'special'}