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: g_bessely.m
    path of file: ./repos/d2d/arFramework3/ThirdParty/StrucID/adimat/runtime
    
    the code of the file until where you have to start completion: % function [z, g_z] = g_besselj(nu, g_x, x, opt?)
%
% compute the derivative of z in z = bessely(nu, x, opt?), where g_x
% is the derivative of x.
%
% see also dpartial_bessely
%
% This file is part of the ADiMat runtime environment
%
% Copyright 2013 Johannes Willkomm, Fachgebiet Scientific Computing
%                     TU Darmstadt
function [z, g_z] = g_bessely(nu, g_x, x, varargin)
  if isempty(nu) || isempty(x
    
function [z, g_z] = g_besselj(nu, g_x, x, opt?)
%
% compute the derivative of z in z = bessely(nu, x, opt?), where g_x
% is the derivative of x.
%
% see also dpartial_bessely
%
% This file is part of the ADiMat runtime environment
%
% Copyright 2013 Johannes Willkomm, Fachgebiet Scientific Computing
%                     TU Darmstadt
function [z, g_z] = g_bessely(nu, g_x, x, varargin)
  if isempty(nu) || isempty(x)
    z = bessely(nu, x);
    g_z = g_zeros(size(z));
  else
    [p z] = dpartial_bessely(nu, x, varargin{:});
    g_z = p .* g_x;
  end