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();
    }