private static ArgumentMismatchException BuildException(string function, List <IArgumentValidator> arguments)
        {
            var signature = new StringBuilder($"Function {function} takes {arguments.Count} arguments: ");

            for (var i = 0; i < arguments.Count; i++)
            {
                if (i == 0)
                {
                    signature.Append(GetArgumentSignature(arguments[i]));
                }
                else
                {
                    signature.Append($", {GetArgumentSignature(arguments[i])}");
                }
            }

            return(ThrowHelper.ArgumentMismatch(signature.ToString()));
        }