nodes: 0, module; 1, function_definition; 2, function_name:_sanitize_and_check; 3, parameters; 4, block; 5, identifier:indexes; 6, expression_statement; 7, expression_statement; 8, if_statement; 9, if_statement; 10, comment:"""
      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'}
      """; 11, assignment; 12, comparison_operator:list in kinds; 13, block; 14, boolean_operator; 15, block; 16, else_clause; 17, identifier:kinds; 18, call; 19, identifier:list; 20, identifier:kinds; 21, if_statement; 22, comparison_operator:len(kinds) > 1; 23, comparison_operator:Index not in kinds; 24, return_statement; 25, block; 26, identifier:list; 27, argument_list; 28, comparison_operator:len(kinds) > 1; 29, block; 30, else_clause; 31, call; 32, integer:1; 33, identifier:Index; 34, identifier:kinds; 35, expression_list; 36, return_statement; 37, set_comprehension; 38, call; 39, integer:1; 40, expression_statement; 41, expression_statement; 42, block; 43, identifier:len; 44, argument_list; 45, identifier:indexes; 46, string; 47, expression_list; 48, call; 49, for_in_clause; 50, identifier:len; 51, argument_list; 52, assignment; 53, call; 54, return_statement; 55, identifier:kinds; 56, string_content:special; 57, identifier:indexes; 58, string; 59, identifier:type; 60, argument_list; 61, identifier:index; 62, identifier:indexes; 63, identifier:kinds; 64, identifier:indexes; 65, list_comprehension; 66, attribute; 67, argument_list; 68, expression_list; 69, string_content:array; 70, identifier:index; 71, conditional_expression:Index(com.try_sort(x))
                         if not isinstance(x, Index) else
                         x; 72, for_in_clause; 73, identifier:kinds; 74, identifier:remove; 75, identifier:list; 76, identifier:indexes; 77, string; 78, call; 79, not_operator; 80, identifier:x; 81, identifier:x; 82, identifier:indexes; 83, string_content:list; 84, identifier:Index; 85, argument_list; 86, call; 87, call; 88, identifier:isinstance; 89, argument_list; 90, attribute; 91, argument_list; 92, identifier:x; 93, identifier:Index; 94, identifier:com; 95, identifier:try_sort; 96, identifier:x
code: def _sanitize_and_check(indexes):
      """
      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'}
      """
      kinds = list({type(index) for index in indexes})
  
      if list in kinds:
          if len(kinds) > 1:
              indexes = [Index(com.try_sort(x))
                         if not isinstance(x, Index) else
                         x for x in indexes]
              kinds.remove(list)
          else:
              return indexes, 'list'
  
      if len(kinds) > 1 or Index not in kinds:
          return indexes, 'special'
      else:
          return indexes, 'array'