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: mount_nfs.rb
    path of file: ./repos/vagrant/plugins/guests/smartos/cap
    
    the code of the file until where you have to start completion: # Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: BUSL-1.1

module VagrantPlugins
  module GuestSmartos
    module Cap
      class MountNFS
        def self.mount_nfs_folder(machine, ip, folders)
          sudo = machine.config.smartos.suexec_cmd

          folders.each do |name, opts|
            machine.communicate.tap do |comm|
              nfsDescription = "#{ip}:#{opts[:hostpath]}:#{opts[:guestpath]}"

              comm.execute <<-EOH.sub(/^ */, '')
                if [ -d /usbkey ] && [ "$(zonename)" == "global" ] ; then
                  #{sudo} mkdir -p /usbkey/config.inc
                  printf '#{nfsDescription}\\n' | #{sudo} tee -a /usbkey/config.inc/nfs_mounts
                fi


    
        def self.mount_nfs_folder(machine, ip, folders)
          sudo = machine.config.smartos.suexec_cmd

          folders.each do |name, opts|
            machine.communicate.tap do |comm|
              nfsDescription = "#{ip}:#{opts[:hostpath]}:#{opts[:guestpath]}"

              comm.execute <<-EOH.sub(/^ */, '')
                if [ -d /usbkey ] && [ "$(zonename)" == "global" ] ; then
                  #{sudo} mkdir -p /usbkey/config.inc
                  printf '#{nfsDescription}\\n' | #{sudo} tee -a /usbkey/config.inc/nfs_mounts
                fi

                #{sudo} mkdir -p #{opts[:guestpath]}
                #{sudo} /usr/sbin/mount -F nfs '#{ip}:#{opts[:hostpath]}' '#{opts[:guestpath]}'
              EOH
            end
          end
        end