<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def library_hierarchy_depth(self):
 """ Calculates the library hierarchy depth Counting starts at the current library state. So if the there is no upper library state the depth is one. :return: library hierarchy depth :rtype: int """

        current_library_hierarchy_depth = 1
        library_root_state = self.get_next_upper_library_root_state()
        while library_root_state is not None:
            current_library_hierarchy_depth += 1
            library_root_state = library_root_state.parent.get_next_upper_library_root_state()
        return current_library_hierarchy_depth