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: drawDirectedEdges.m
    path of file: ./repos/matGeom/matGeom/graphs
    
    the code of the file until where you have to start completion: function varargout = drawDirectedEdges(nodes, edges, varargin)
%DRAWDIRECTEDEDGES Draw edges with arrow indicating direction.
% 
%   usage:
%   drawDirectedEdges(NODES, EDGES);
%   Draw edges joining nodes at position NODES, using a small arrow mark to
%   depict the direction of the edges?
%
%
%   drawDirectedEdges(NODES, EDGES, DIRECT)

    
function varargout = drawDirectedEdges(nodes, edges, varargin)
%DRAWDIRECTEDEDGES Draw edges with arrow indicating direction.
% 
%   usage:
%   drawDirectedEdges(NODES, EDGES);
%   Draw edges joining nodes at position NODES, using a small arrow mark to
%   depict the direction of the edges?
%
%
%   drawDirectedEdges(NODES, EDGES, DIRECT)
%   Also specifies the base direction of all edges. DIRECT is true by
%   default. If DIRECT is false all edges are inverted.
%   
%   H = drawDirectedEdges(NODES, EDGES)
%   Returns handles to each of the lines created.
%

% ------
% Author: David Legland 
% E-mail: david.legland@inrae.fr
% Created: 2003-03-12
% Copyright 2003-2023 INRA - TPV URPOI - BIA IMASTE

% determinate direction of arrows
direct = true;
if ~isempty(varargin)
    direct = varargin{1};
end