def insert(index, *elements)
      raise IndexError if index < -@size
      index += @size if index < 0

      elements = elements.map { |element| Erlang.from(element) }

      if index < @size
        suffix = flatten_suffix(@root, @levels * BITS_PER_LEVEL, index, [])
        suffix.unshift(*elements)
      elsif index == @size
        suffix = elements
      else
        suffix = Array.new(index - @size, nil).concat(elements)
        index = @size
      end

      return replace_suffix(index, suffix)
    end
def insert(index, *elements)
      raise IndexError if index < -@size
      index += @size if index < 0

      elements = elements.map { |element| Erlang.from(element) }

      if index < @size
        suffix = flatten_suffix(@root, @levels * BITS_PER_LEVEL, index, [])
        suffix.unshift(*elements)
      elsif index == @size
        suffix = elements
      else
        suffix = Array.new(index - @size, nil).concat(elements)
        index = @size
      end

      return replace_suffix(index, suffix)
    end
Return a new `Tuple` with the given values inserted before the element
 at `index`. If `index` is greater than the current length, `nil` values
 are added to pad the `Tuple` to the required size.

 @example
   Erlang::Tuple["A", "B", "C", "D"].insert(2, "X", "Y", "Z")
   # => Erlang::Tuple["A", "B", "X", "Y", "Z", "C", "D"]
   Erlang::Tuple[].insert(2, "X", "Y", "Z")
   # => Erlang::Tuple[nil, nil, "X", "Y", "Z"]

 @param index [Integer] The index where the new elements should go
 @param elements [Array] The elements to add
 @return [Tuple]
 @raise [IndexError] if index exceeds negative range.