is_spark_notebook_file = function(filename) {
        return filename.endsWith(".snb") || filename.endsWith(".snb.ipynb");
    }
Creates a wrappable Promise rejection function.

Creates a function that returns a Promise.reject with a new WrappedError
that has the provided message and wraps the original error that
caused the promise to reject.