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: perf_generate.rb
    path of file: ./repos/manageiq/spec/tools
    
    the code of the file until where you have to start completion: require 'optimist'
ARGV.shift if ARGV[0] == '--'
opts =
    
  def with_vms_and_hosts
    NUM_HOSTS.times do |h_id|
      VMS_PER_HOST.times do |v_count|
        v_id = h_id * VMS_PER_HOST + v_count
        yield "Vm", v_id + 1
      end
      yield "Host", h_id + 1
    end
  end