"""Now let’s check if the labels in the MultiIndex are lexicographically sorted or not.""" # check if labels are sorted or not midx.is_lexsorted()