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: xform_nii.m
    path of file: ./repos/bspm/thirdparty/bramila/external/ISC_toolbox/niftitools
    
    the code of the file until where you have to start completion: %  internal function

%  'xform_nii.m' is an intern
    
function [space_unit, time_unit] = get_units(hdr)

   switch bitand(hdr.dime.xyzt_units, 7)	% mask with 0x07
   case 1
      space_unit = 1e+3;		% meter, m
   case 3
      space_unit = 1e-3;		% micrometer, um
   otherwise
      space_unit = 1;			% millimeter, mm
   end