How are destruction warlocks macroing their imp petattacks?

I see some people have this in their dps grind macro with just a line added under /assist focus for /petattack. And then other macros have it ignored, like the db wiki for example or the compilation.

Obviously you cannot spam /petattack with the imp since he basically does this ever time you /petattack with him. Unlike other pets where your telling them to do attack a mob as they see fit without a stopcasting.

Code:
/assist player
/stopcasting
/cast fireball