How to edit pipeline transforms

I have this pipeline:

const pipeline = util.promisify(stream.pipeline);

const test = async(socketA, socketB)=>{
    sockstA.on('throttle', () => {
        // how do I introduce throttle transform into the pipeline?
        // I need pipeline(socketA, throttleTransform(), socketB);
    });
    await pipeline(socketA, socketB);
}

The pipeline starts with 2 sockets and, based on a certain event, I want to introduce a throttling transform into the mix but I don’t know how to do that with stream.pipeline. I know it has an abort signal but that closes everything and sends an abort error.