code: def safe_index(elements: Sequence[T], value: T):
      
      try:
          return elements.index(value)
      except ValueError:
          return -1
docs: Find the location of `value` in `elements`, return -1 if `value` is
      not found instead of raising ``ValueError``.
  
      Parameters
      ----------
      elements
      value
  
      Returns
      -------
      int
  
      Examples
      --------
      >>> sequence = [1, 2, 3]
      >>> safe_index(sequence, 2)
      1
      >>> safe_index(sequence, 4)
      -1