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: login_provisioned_device.go
    path of file: ./repos/client/go/engine
    
    the code of the file until where you have to start completion: // Copyright 2015 Keybase, Inc. All rights reserved. Use of
// this source code is governed by the included BSD license.

package engine

import (
	"github.com/keybase/client/go/libkb"
	"github.com/keybase/client/go/protocol/keybase1"
)

// LoginProvisionedDevice is an engine that tries to login using the
// current device, if there is an existing provisioned device.
type LoginProvisionedDevice struct {
	libkb.Contextified
	username        libkb.NormalizedUsername
	uid             keybase1.UI
    
func (e *LoginProvisionedDevice) reattemptUnlock(m libkb.MetaContext) (success bool, err error) {
	defer m.Trace("LoginProvisionedDevice#reattemptUnlock", &err)()
	ad, err := libkb.LoadProvisionalActiveDevice(m, e.uid, e.deviceID, true)
	if err != nil {
		m.Debug("Failed to load provisional device for user, but swallowing error: %s", err.Error())
		return false, nil
	}
	if ad == nil {
		m.Debug("Unexpected nil active device from LoadProvisionalActiveDevice without error")
		return false, nil
	}
	err = m.SwitchUserToActiveDevice(e.username, ad)
	if err != nil {
		m.Debug("Error switching to new active device: %s", err.Error())
		return false, err
	}
	return true, nil
}