code: def _rindex(sequence: Sequence[T], obj: T) -> int:
      
      for i in range(len(sequence) - 1, -1, -1):
          if sequence[i] == obj:
              return i
  
      raise ValueError(f"Unable to find {obj} in sequence {sequence}.")
docs: Return zero-based index in the sequence of the last item whose value is equal to obj.  Raises a
      ValueError if there is no such item.
  
      Parameters
      ----------
      sequence : ``Sequence[T]``
      obj : ``T``
  
      Returns
      -------
      zero-based index associated to the position of the last item equal to obj