code: def rindex(self, sub, start=None, end=None):
          
          return self.value_no_colors.rindex(sub, start, end)
docs: Like .rfind() but raise ValueError when the substring is not found.
  
          :param str sub: Substring to search.
          :param int start: Beginning position.
          :param int end: Stop comparison at this position.