code: def testWrongException(self):
      mock_fn = mock.MagicMock()
  
      @retry.retry(expected_exception=KeyError)
      def fail():
          mock_fn()
          raise ValueError()
  
      with self.assertRaises(ValueError):
          fail()
      self.assertEqual(mock_fn.call_count, 1)
  
file_path: tfx/tfx/utils/retry_test.py
imports: import time
  from unittest import mock
  import tensorflow
  from tfx.utils import retry
label_desc: Use image node_id 6 for calling the RetryTest obj's underlying member method code with example usage: obj.testWrongException() without return types