code: def peek(rlp, index, sedes=None):
      
      ll = decode_lazy(rlp)
      if not isinstance(index, Iterable):
          index = [index]
      for i in index:
          if isinstance(ll, Atomic):
              raise IndexError('Too many indices given')
          ll = ll[i]
      if sedes:
          return sedes.deserialize(ll)
      else:
          return ll
docs: Get a specific element from an rlp encoded nested list.
  
      This function uses :func:`rlp.decode_lazy` and, thus, decodes only the
      necessary parts of the string.
  
      Usage example::
  
          >>> import rlp
          >>> rlpdata = rlp.encode([1, 2, [3, [4, 5]]])
          >>> rlp.peek(rlpdata, 0, rlp.sedes.big_endian_int)
          1
          >>> rlp.peek(rlpdata, [2, 0], rlp.sedes.big_endian_int)
          3
  
      :param rlp: the rlp string
      :param index: the index of the element to peek at (can be a list for
                    nested data)
      :param sedes: a sedes used to deserialize the peeked at object, or `None`
                    if no deserialization should be performed
      :raises: :exc:`IndexError` if `index` is invalid (out of range or too many
               levels)