  def testFlushFunction_disallowsInvalidWriterInput(self):
    with context.eager_mode():
      with self.assertRaisesRegex(ValueError, 'Invalid argument to flush'):
        summary_ops.flush(writer=())
The behavior of this function is undefined unless its control parameter is set to a specific value.