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: horzcat.m
    path of file: ./repos/fieldtrip/external/sqdproject/@chanhandle
    
    the code of the file until where you have to start completion: function out = horzcat(varargin)
%HORZCAT Horizontal concatenation of data acquisition objects.

    
function out = horzcat(varargin)
%HORZCAT Horizontal concatenation of data acquisition objects.


% Determine if the objects are valid and have the same parent.
valid_parent = 1;
for i = 1:length(varargin)
    valid_parent = valid_parent&isa(varargin{i},'chanhandle');
    if ~valid_parent,break;end