@contextlib.contextmanager<EOL><INDENT>def assertRaisesWithPredicateMatch(self,<EOL>exception_type,<EOL>expected_err_re_or_predicate):<EOL><DEDENT>
<EOL>if not tf.executing_eagerly():<EOL><INDENT>yield<EOL>return<EOL><DEDENT>with super(TestCase, self).assertRaisesWithPredicateMatch(<EOL>exception_type, expected_err_re_or_predicate):<EOL><INDENT>yield<EOL><DEDENT>
Returns a context manager to enclose code expected to raise an exception.

        If the exception is an OpError, the op stack is also included in the message
        predicate search.

        Args:
          exception_type: The expected type of exception that should be raised.
          expected_err_re_or_predicate: If this is callable, it should be a function
            of one argument that inspects the passed-in exception and returns True
            (success) or False (please fail the test). Otherwise, the error message
            is expected to match this regular expression partially.

        Returns:
          A context manager to surround code that is expected to raise an
          exception.