My company had an aircraft experience a series of compressor stalls on take-off - noise, banging, ejected visible flame etc. so it isn't THAT "hypothetical"
If you retard the thrust lever (at a safe height) and regain control of the engine, it is best to leave the engine at idle and return. Attempting to continue, even if the engine is fine, may cause a riot in the cabin amongst the passengers (and later, the press)
If you have shut the engine down - which wouldn't be unusual in these circumstances - it is best to leave it shut down & return for engineering assessment
unless you NEED the thrust.