code: def middle_end(self, index):
          
          if (index < 0) or (index > self.all_length):
              raise ValueError(u"The given index is not valid")
          self.__middle_end = index
docs: Set the index (+1) where MIDDLE ends.
  
          :param int index: the new index for MIDDLE end