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: runner.rb
    path of file: ./repos/fastlane/snapshot/lib/snapshot
    
    the code of the file until where you have to start completion: require 'shellwords'
require 'plist'
require 'os'
require 'thread'
require 'terminal-table'

require 'fastlane_core/print_table'
require_relative 'module'
require_r
    
    def work
      if File.exist?("./fastlane/snapshot.js") || File.exist?("./snapshot.js")
        UI.error("Found old snapshot configuration file 'snapshot.js'")
        UI.error("You updated to snapshot 1.0 which now uses UI Automation")
        UI.error("Please follow the migration guide: https://github.com/fastlane/fastlane/blob/master/snapshot/MigrationGuide.md")
        UI.error("And read the updated documentation: https://docs.fastlane.tools/actions/snapshot/")
        sleep(3) # to be sure the user sees this, as compiling clears the screen
      end

      Snapshot.config[:output_directory] = File.expand_path(Snapshot.config[:output_directory])

      verify_helper_is_current

      # Also print out the path to the used Xcode installation
      # We go 2 folders up, to not show "Contents/Developer/"
      values = Snapshot.config.values(ask: false)
      values[:xcode_path] = File.expand_path("../..", FastlaneCore::Helper.xcode_path)
      FastlaneCore::PrintTable.print_values(config: values, hide_keys: [], title: "Summary for snapshot #{Fastlane::VERSION}")

      clear_previous_screenshots if Snapshot.config[:clear_previous_screenshots]

      UI.success("Building and running project - this might take some time...")

      launcher_config = SimulatorLauncherConfiguration.new(snapshot_config: Snapshot.config)

      if Helper.xcode_at_least?(9)
        launcher = SimulatorLauncher.new(launcher_configuration: launcher_config)
        results = launcher.take_screenshots_simultaneously
      else
        launcher = SimulatorLauncherXcode8.new(launcher_configuration: launcher_config)
        results = launcher.take_screenshots_one_simulator_at_a_time
      end