@doc(Index._maybe_cast_listlike_indexer)
def _maybe_cast_listlike_indexer(self, keyarr):
    try:
        res = self._data._validate_listlike(keyarr, allow_object=True)
    except (ValueError, TypeError):
        if (not isinstance(keyarr, ExtensionArray)):
            res = com.asarray_tuplesafe(keyarr)
        else:
            res = keyarr
    return Index(res, dtype=res.dtype)
@doc(Index._maybe_cast_listlike_indexer)
def _maybe_cast_listlike_indexer(self, keyarr):
    try:
        res = self._data._validate_listlike(keyarr, allow_object=True)
    except (ValueError, TypeError):
        if (not isinstance(keyarr, ExtensionArray)):
            res = com.asarray_tuplesafe(keyarr)
        else:
            res = keyarr
    return Index(res, dtype=res.dtype)