function replaceTensors(obj) {
    for (let prop in obj) {
        if (isONNXTensor(obj[prop])) {
            obj[prop] = new Tensor(obj[prop]);
        } else if (typeof obj[prop] === 'object') {
            replaceTensors(obj[prop]);
        }
    }
    return obj;
}
Replaces ONNX Tensor objects with custom Tensor objects to support additional functions.
@param {Object} obj The object to replace tensor objects in.
@returns {Object} The object with tensor objects replaced by custom Tensor objects.
@private