You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: search_parser_spec.rb
    path of file: ./repos/lobsters/spec/models
    
    the code of the file until where you have to start completion: # typed: false

require "rails_helper"
require "parslet/convenience" # sp.parse_with_debug("input") for tree
require
    
  def nested_map obj, &blk
    if obj.is_a? Array
      obj.map { |o| nested_map o, &blk }
    elsif obj.is_a? Hash
      obj.transform_values { |v| nested_map v, &blk }
    else
      blk.call obj
    end