<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def items_sort(cls, items):
 """Sort list items, taking into account parent items. Args: items (list[gkeepapi.node.ListItem]):
 Items to sort. Returns: list[gkeepapi.node.ListItem]: Sorted items. """

        class t(tuple):
            """Tuple with element-based sorting"""
            def __cmp__(self, other):
                for a, b in six.moves.zip_longest(self, other):
                    if a != b:
                        if a is None:
                            return 1
                        if b is None:
                            return -1
                        return a - b
                return 0

            def __lt__(self, other):
                return self.__cmp__(other) < 0
            def __gt_(self, other):
                return self.__cmp__(other) > 0
            def __le__(self, other):
                return self.__cmp__(other) <= 0
            def __ge_(self, other):
                return self.__cmp__(other) >= 0
            def __eq__(self, other):
                return self.__cmp__(other) == 0
            def __ne__(self, other):
                return self.__cmp__(other) != 0

        def key_func(x):
            if x.indented:
                return t((int(x.parent_item.sort), int(x.sort)))
            return t((int(x.sort), ))

        return sorted(items, key=key_func, reverse=True)