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: parseBC.m
    path of file: ./repos/chebfun/@chebop
    
    the code of the file until where you have to start completion: function result = parseBC(N, BC, type)
%PARSEBC  Parse boundary conditions for 
    
function handle that represents the
%   given condition as needed internally.

% Copyright 2017 by The University of Oxford and The Chebfun Developers. 
% See http://www.chebfun.org/ for Chebfun information.

numIn = nargin(N);

if ( isempty(BC) )
    result = [];
    
elseif ( isnumeric(BC) )
    % We reach here if we get assigned BCs like N.lbc = [1; 3].
    %   * In the scalar case, this means setting up conditions so that the
    %     solution equals the first entry of the vector at the end