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: failed_old_halfspace_bug243.m
    path of file: ./repos/fieldtrip/test/invalid
    
    the code of the file until where you have to start completion: function failed_old_halfspace_bug243

% MEM 1gb
% WALLTIME 00:10:00
% DEPENDENCY

% this tests for bug 243

% create vol conductor for halfspace (in mm)
geom.pnt = [[0 2 0];[0 0 0];[1 2 0]];
vol_hs = ft_headmodel_halfspace(geom,[-1 -1 -1],'conductivity',1);

% FIXME: this solution takes into account only dipole projected on surface
%   choose adequate electrodes set

  % create vol conductor for sphere (radius = 100 m)
  r = 1e5; % in mm
  pnt = r*mesh_sphere(162);
  pnt(:,3) = pnt(:,3) - r;

    
function failed_old_halfspace_bug243

% MEM 1gb
% WALLTIME 00:10:00
% DEPENDENCY

% this tests for bug 243

% create vol conductor for halfspace (in mm)
geom.pnt = [[0 2 0];[0 0 0];[1 2 0]];
vol_hs = ft_headmodel_halfspace(geom,[-1 -1 -1],'conductivity',1);

% FIXME: this solution takes into account only dipole projected on surface
%   choose adequate electrodes set

  % create vol conductor for sphere (radius = 100 m)
  r = 1e5; % in mm
  pnt = r*mesh_sphere(162);
  pnt(:,3) = pnt(:,3) - r;
  % figure,ft_plot_mesh(pnt),axis on
  vol_sph = ft_headmodel_singlesphere(pnt,'conductivity',1);


% FIXME: test infinite vs halfspace when both electrodes and dipoles are
% very far away from plane

% FIXME: test halfpsace versus BEM when the surface is very big

% create infinite volume conductor
vol = [];
vol.type = 'infinite';

% create electrodes positions
elec.pnt = [[0 0 -0.2];[0 0 -0.4];[0 0 -0.6];[0 0 -0.8];[0 0 -1];[0 0 -1.2];[0 0 -1.4];[0 0 -1.6]];
for i=1:8
  elec.label{i} = sprintf('ch%0.2d',i);
end