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: size.m
    path of file: ./repos/spm/@file_array
    
    the code of the file until where you have to start completion: function d = size(a,varargin)
% Method 'size' for file_array objects
%__________________________________________________________________________

% Copyright (C) 2005-2022 Wellcome Centre for Human Neuroimaging


sa  = struct(a);

    
function d = size(a,varargin)
% Method 'size' for file_array objects
%__________________________________________________________________________

% Copyright (C) 2005-2022 Wellcome Centre for Human Neuroimaging


sa  = struct(a);
nd  = 0;
for i=1:numel(sa)
    nd = max(nd,numel(sa(i).dim));
    nd = max(nd,max(find(sa(i).pos==1)));
end