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: createTrackingOverlayVideo.m
    path of file: ./repos/ciatah/+ciapkg/+tracking
    
    the code of the file until where you have to start completion: function [inputTrackingVideo] = createTrackingOverlayVideo(inputTrackingVideo,inputX,inputY,varargin)
	% Takes tracking data and makes an overlay on a behavioral movie.
	% Biafra Ahanonu
	% started: 2014.01.03 [19:13:01]
	% inputs
		% inputTrackingVideo - [x y frames] movie or path to AVI file
		% inputX - [1 frames] vector or path to csv table
		% inputY - [1 frames] vector or blank of inputX is a path
	% outputs
		%

	% changelog
		% 2021.08.08 [19:30:20] - Updated to handle CIAtah v4.0 switch to all functions inside ciapkg package.
	% TODO
		%

	import ciapkg.api.* % import CIAtah functions in ciapkg package API.

	%========================
	options.extraVideo = '';
	% velocity cutoff to say if object is moving

    
function [inputTrackingVideo] = createTrackingOverlayVideo(inputTrackingVideo,inputX,inputY,varargin)
	% Takes tracking data and makes an overlay on a behavioral movie.
	% Biafra Ahanonu
	% started: 2014.01.03 [19:13:01]
	% inputs
		% inputTrackingVideo - [x y frames] movie or path to AVI file
		% inputX - [1 frames] vector or path to csv table
		% inputY - [1 frames] vector or blank of inputX is a path
	% outputs
		%

	% changelog
		% 2021.08.08 [19:30:20] - Updated to handle CIAtah v4.0 switch to all functions inside ciapkg package.
	% TODO
		%

	import ciapkg.api.* % import CIAtah functions in ciapkg package API.

	%========================
	options.extraVideo = '';
	% velocity cutoff to say if object is moving
	options.STIM_CUTOFF = 25;
	% speed for middle cutoff
	options.midCutoff = 10;
	% frames per second
	options.framesPerSecond = 5;
	% speed for high cutoff
	options.highCutoff = 20;
	% frame list if loading movie
	options.frameList= [];
	% how much is input movie downsampled, used if only loaded every nth frame.
	options.downsampleFactor = 1;
	% amount to downsample the movie before saving
	options.downsampleMovieFactor = 2;
	% path to save movie
	options.saveMoviePath = [];
	% input velocity vector
	options.velocity = [];
	% get options
	options = getOptions(options,varargin);
	% display(options)
	% unpack options into current workspace
	% fn=fieldnames(options);
	% for i=1:length(fn)
	% 	eval([fn{i} '=options.' fn{i} ';']);
	% end