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(list(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"
  
imports: from __future__ import annotations
  import textwrap
  from typing import cast
  import numpy
  from pandas._libs import NaT, lib
  from pandas._typing import Axis
  from pandas.errors import InvalidIndexError
  from pandas.core.dtypes.cast import find_common_type
  from pandas.core.algorithms import safe_sort
  from pandas.core.indexes.base import Index, _new_Index, ensure_index, ensure_index_from_sequences, get_unanimous_names
  from pandas.core.indexes.category import CategoricalIndex
  from pandas.core.indexes.datetimes import DatetimeIndex
  from pandas.core.indexes.interval import IntervalIndex
  from pandas.core.indexes.multi import MultiIndex
  from pandas.core.indexes.period import PeriodIndex
  from pandas.core.indexes.range import RangeIndex
  from pandas.core.indexes.timedeltas import TimedeltaIndex
label_desc: Use image node_id 6 for calling a global function with example usage: _sanitize_and_check(indexes) and returns: indexes,  str, indexes,  str, indexes,  str