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: isalmostequal.m
    path of file: ./repos/spm/external/fieldtrip/specest/private
    
    the code of the file until where you have to start completion: function [ok, message] = isalmostequal(a, b, varargin)

% ISALMOSTEQUAL compares two input variables and returns true/false
% and a message containing the details on the observed difference.

    
function [message] = do_work(a, b, depth, location, message, varargin)

knowntypes = {
  'double'          % Double precision floating point numeric array
  'logical'         % Logical array
  'char'            % Character array
  'cell'            % Cell array
  'table'           % Table
  'struct'          % Structure array
  'numeric'         % Integer or floating-point array
  'single'          % Single precision floating-point numeric array
  'int8'            % 8-bit signed integer array
  'uint8'           % 8-bit unsigned integer array
  'int16'           % 16-bit signed integer array
  'uint16'          % 16-bit unsigned integer array
  'int32'           % 32-bit signed integer array
  'uint32'          % 32-bit unsigned integer array
  };

if isempty(location)
  location = 'array';
end