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: idev_screen.go
    path of file: ./repos/ipsw/cmd/ipsw/cmd/idev
    
    the code of the file until where you have to start completion: /*
Copyright Â© 2018-2024 blacktop

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated 
    
func saveScreenshot(dev *lockdownd.DeviceValues, destPath string) error {
	cli, err := screenshot.NewClient(dev.UniqueDeviceID)
	if err != nil {
		return fmt.Errorf("failed to connect to iDevice with UUID %s: %w", dev.UniqueDeviceID, err)
	}
	defer cli.Close()

	png, err := cli.Screenshot()
	if err != nil {
		return fmt.Errorf("failed to get screenshot: %w", err)
	}

	fname := fmt.Sprintf("screenshot_%s.png", time.Now().Format("02Jan2006_15:04:05MST"))
	fname = filepath.Join(destPath, fmt.Sprintf("%s_%s_%s", dev.ProductType, dev.HardwareModel, dev.BuildVersion), fname)
	if err := os.MkdirAll(filepath.Dir(fname), 0755); err != nil {
		return fmt.Errorf("failed to create screenshot directory %s: %w", filepath.Dir(fname), err)
	}
	log.Infof("Creating screenshot: %s", fname)
	return os.WriteFile(fname, png, 0660)
}