code: public static function get(Iterator $iterator, int $position)
      {
          Iterators::advance($iterator, $position);
          if (!$iterator->valid()) {
              throw new OutOfBoundsException("The requested index '{$position}' is invalid");
          }
          return $iterator->current();
      }
docs: Advances iterator position times, returning the element at the positionth position.
  
  @param Iterator $iterator
  @param int $position
  @return mixed
  @throws OutOfBoundsException if position does not exist