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: arFitLHSCluster.m
    path of file: ./repos/d2d/arFramework3/ClusterFunctions
    
    the code of the file until where you have to start completion: % job = arFitLHSCluster(cluster, [clusterpath, pool_size, n, randomseed, log_fit_history, backup_save])
%
% fit sequence using 
%   - latin hyper cube 
    
function varargout = arFitLHSCluster(cluster, clusterpath, pool_size, n, randomseed, log_fit_history, backup_save)

global ar
global ar_fitlhs_cluster

if(isempty(ar_fitlhs_cluster) || strcmp(ar_fitlhs_cluster.State, 'deleted')) % new job
    if(nargin==0)
        error('specify cluster!');
    end