<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_total_indentation(self, index):
 """Get the indentation for the given index :param index: the index to query :type index: :class:`QtCore.ModelIndex` :returns: the number of parents :rtype: int :raises: None """

        n = 0
        while index.isValid():
            n += 1
            index = index.parent()
        return n * self.indentation()