def sorted_element_targets(element_target_list):
    """Sort element_targets in reverse based on the their depth in the
    inheritance hierarchy.

    This will make sure any general target, like text will be applied by
    a specific target like axis_text_x.

    """
    def key(element_target_):
        return len(element_target_.__class__.__mro__)

    return sorted(element_target_list, key=key, reverse=True)