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

require 'vagrant/uti
    
        def exec_command(machine, command, options)
          exec_cmd = %w(docker exec)
          exec_cmd << "-i" if options[:interactive]
          exec_cmd << "-t" if options[:pty]
          exec_cmd << "-u" << options[:user] if options[:user]
          exec_cmd << machine.id
          exec_cmd += options[:extra_args] if options[:extra_args]
          exec_cmd += command

          # Run this interactively if asked.
          exec_options = options

          if options[:pty]
            Vagrant::Util::SafeExec.exec(exec_cmd[0], *exec_cmd[1..-1])
          else
            output = ""
            machine.provider.driver.execute(*exec_cmd, exec_options) do |type, data|
              output += data
            end

            output_options = {}
            output_options[:prefix] = false if !options[:prefix]

            if !output.empty?
              machine.ui.output(output.chomp, **output_options)
            end