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: MTFLCd_SSolver.m
    path of file: ./repos/MALSAR/MALSAR/functions/calibration
    
    the code of the file until where you have to start completion: function [ W, info ] = MTFLCd_SSolver( X, y, lambda1, lambda2, opts )
%
% Multi-Task Feature Learning with Calibration
% diagnoal version for faster computation on small sample size.
% smoothing -- using solver.
%

    
function [ W, info ] = MTFLCd_SSolver( X, y, lambda1, lambda2, opts )
%
% Multi-Task Feature Learning with Calibration
% diagnoal version for faster computation on small sample size.
% smoothing -- using solver.
%
% OBJECTIVE
%    min_W { sum_i^m ||Xi wi - yi|| + lambda1 ||W||_{1,2} + lambda2/2 ||W||_F^2 }
%
% INPUT
%  X - cell array of {n_i by d matrices} by m
%  y - cell array of {n_i by 1 vectors}  by m
%  lambda1 - regularization parameter of the l2,1 norm penalty
%  lambda2 - regularization parameter of the Fro norm penalty
%
% OUTPUT
%  W - task weights: d by t.
%  funcVal - the funcion value.
%
% Author: Jiayu Zhou, Pinghua Gong

%% Initialization
if(nargin<5), opts = []; end