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: cat_surf_rename.m
    path of file: ./repos/ExploreASL/External/SPMmodified/toolbox/cat12
    
    the code of the file until where you have to start completion: function [PO,sinfo] = cat_surf_rename(P,varargin)
% ______________________________________________________________________
% Rename parts of a cat12 surface filename.
%
%   [PO,sinfo] = cat_surf_rename(P,varargin)
% 
%   P   = 'lh.central.test.gii';
%   Pth = cat_surf_rename(P,'dataname','s3tickness');
%
%   Check the help for cat_surf_info for information about fields that 
%   can be renamed.
% ______________________________________________________________________

    
function [PO,sinfo] = cat_surf_rename(P,varargin)
% ______________________________________________________________________
% Rename parts of a cat12 surface filename.
%
%   [PO,sinfo] = cat_surf_rename(P,varargin)
% 
%   P   = 'lh.central.test.gii';
%   Pth = cat_surf_rename(P,'dataname','s3tickness');
%
%   Check the help for cat_surf_info for information about fields that 
%   can be renamed.
% ______________________________________________________________________
% Robert Dahnke
% $Id: cat_surf_rename.m 1590 2020-03-23 07:38:58Z dahnke $

% Todo: update sinfo! also for other fields!


  PN = struct();
  if mod(nargin-1,2)==1
    error('paired input');
  else
    for i=1:2:numel(varargin)
      PN.(varargin{i}) = varargin{i+1}; 
    end