code: def get_total_indentation(self, index):
          
          n = 0
          while index.isValid():
              n += 1
              index = index.parent()
          return n * self.indentation()
docs: 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