Practice. Those kinds of seizures must have happened many times before, and she discussed how to hide it in plain sight. The decision seems to be to immediately imitate it, pretend its a joke, and through sheer nonresponse make people think it was actually a joke.
Her level of calculation is extraordinary - absolutely nothing she does is unscripted. Faking being a human being is her only true talent.