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: gmtest.m
    path of file: ./repos/gmtmex/src
    
    the code of the file until where you have to start completion: function out = gmtest(test, test_dir, family)
% Run a  test from the GALLERY, tests or doc/scripts
%
% gmtest(test) run an example from the gallery were TEST is is either 'ex01' ... 'ex45'
%
% gmtest(test, test_dir) runs a test from the tests suit. T
    
function [ps, orig_path] = call_test(test, test_dir, g_root_dir, out_path, family)
% Here PS hold the full name of the created PS file and ORIG_PATH must
% contain the path to where the original postscript file, against which the PS will be compared

	ps = '';	orig_path = '';		% Defaults for the case of error
	if (isempty(family))						% A test from the tests suit
		pato = [g_root_dir 'test/' test_dir];
	elseif (strcmp(family, 'scripts'))			% A test for the 'scripts' directory
		pato = [g_root_dir 'doc/scripts/ml/'];
	else
		disp(['Family ' family ' is unknown or not yet implemented.'])
		return
	end