def fetch(key, default = Undefined)
      key = Erlang.from(key)
      entry = @trie.get(key)
      if entry
        return entry[1]
      elsif block_given?
        return yield(key)
      elsif not Undefined.equal?(default)
        return Erlang.from(default)
      else
        raise KeyError, "key not found: #{key.inspect}"
      end
    end
def fetch(key, default = Undefined)
      key = Erlang.from(key)
      entry = @trie.get(key)
      if entry
        return entry[1]
      elsif block_given?
        return yield(key)
      elsif not Undefined.equal?(default)
        return Erlang.from(default)
      else
        raise KeyError, "key not found: #{key.inspect}"
      end
    end
Retrieve the value corresponding to the given key object, or use the provided
 default value or block, or otherwise raise a `KeyError`.

 @overload fetch(key)
   Retrieve the value corresponding to the given key, or raise a `KeyError`
   if it is not found.
   @param key [Object] The key to look up
 @overload fetch(key) { |key| ... }
   Retrieve the value corresponding to the given key, or call the optional
   code block (with the missing key) and get its return value.
   @yield [key] The key which was not found
   @yieldreturn [Object] Object to return since the key was not found
   @param key [Object] The key to look up
 @overload fetch(key, default)
   Retrieve the value corresponding to the given key, or else return
   the provided `default` value.
   @param key [Object] The key to look up
   @param default [Object] Object to return if the key is not found

 @example
   m = Erlang::Map["A" => 1, "B" => 2, "C" => 3]
   m.fetch("B")         # => 2
   m.fetch("Elephant")  # => KeyError: key not found: "Elephant"

   # with a default value:
   m.fetch("B", 99)         # => 2
   m.fetch("Elephant", 99)  # => 99

   # with a block:
   m.fetch("B") { |key| key.size }         # => 2
   m.fetch("Elephant") { |key| key.size }  # => 8

 @return [Object]