title: What does Polymer.flush() do?
body: <p>What exactly does the Polymer.flush() function do? I have used it in writing tests for a polymer component using paper-dialog. 
  It says here in the <a href="https://www.polymer-project.org/1.0/docs/devguide/local-dom" rel="nofollow noreferrer">documentation</a> that it has to be called immediately after any dom mutations. 
  Can anyone explain what is happening here behind scenes and some other scenarios where this function is needed?</p>