CLN: Remove unnecessary _rec_to_dict method
remove duplicate compat
TST: Add test case for sort_index by column with bad axis
TST: Add test case for bad input: multi-column duplicate sort_index
ENH: raise_with_traceback - make traceback optional