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: start_instance.rb
    path of file: ./repos/vagrant-azure/lib/vagrant-azure/action
    
    the code of the file until where you have to start completion: # encoding: utf-8
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License in the project root for license information.
require 'log4r'
require 'vagrant-azure/util/mac
    
        def call(env)
          env[:metrics] ||= {}

          parsed = parse_machine_id(env[:machine].id)
          azure = env[:azure_arm_service]
          env[:ui].info(I18n.t('vagrant_azure.starting', parsed))
          azure.compute.virtual_machines.start(parsed[:group], parsed[:name])

          # Wait for the instance to be ready first
          env[:metrics]['instance_ready_time'] = Util::Timer.time do

            env[:ui].info(I18n.t('vagrant_azure.waiting_for_ready'))

            task = await_true(env) do |vm|
              running?(vm.instance_view.statuses)
            end

            if task.value
              env[:ui].info(I18n.t('vagrant_azure.started', parsed))
            else
              raise I18n.t('vagrant_azure.errors.failed_starting', parsed) unless env[:interrupted]
            end
          end