human
Complete the below
def expect_failure_with_message(message):

    ''''Ensure the test raises an exception and does not emit an event'
    '''
assistant
#Here is the Python program you requested.
    def test_decorator(func):
        def test_decorated(self, *args, **kwargs):
            self.assertRaisesRegexp(segmentio.EventValidationError, message, func, self, *args, **kwargs)
            self.assert_no_events_emitted()
        return test_decorated
    return test_decorator