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: localization_left_phi_inv.m
    path of file: ./repos/libDirectional/lib/external/ukfm/examples/localization
    
    the code of the file until where you have to start completion: function [xi] = localization_left_phi_inv(state, hat_state)

    
function [xi] = localization_left_phi_inv(state, hat_state)
%LOCALIZATION_LEFT_PHI_INV inverse retraction
%
% Syntax: [xi] = localization_left_phi_inv(state, hat_state)
%
% Inputs:
%    state - state
%    hat_state - state
%
% Outputs:
%    xi - uncertainty

% move to SE(2)
chi = [state.Rot state.p;
       0 0 1];
hat_chi = [hat_state.Rot hat_state.p;
       0 0 1];   
% compute log
xi = se2_log(se2_inv(chi) * hat_chi);
end