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: deploy.rb
    path of file: ./repos/rbvmomi/lib/rbvmomi/utils
    
    the code of the file until where you have to start completion: # frozen_string_literal: true
# Copyright (c) 2012-2017 VMware, Inc.  All Rights Reserved.
# SPDX-License-Identifier: MIT

require 'open-uri'
require 'nokogiri'
require_relative '../../rbvmomi'

# The cached ovf deployer is an optimization on top of regular OVF dep
    
  def linked_clone template_vm, vm_name, config, opts = {}
    spec = {
      location: {
        pool: @rp,
        datastore: @datastore,
        diskMoveType: :moveChildMostDiskBacking,
      },
      powerOn: false,
      template: false,
      config: config,
    }
    if opts[:is_template]
      wait_for_template = false
      template_name = "#{vm_name}-#{@computer.name}"
      begin
        vm = template_vm.CloneVM_Task(
          folder: @template_folder,
          name: template_name,
          spec: spec
        ).wait_for_completion
      rescue RbVmomi::Fault => fault
        if fault.fault.is_a?(RbVmomi::VIM::DuplicateName)
          wait_for_template = true
        else
          raise
        end