code: def testSuccessful(self):
      mock_fn = mock.MagicMock()
  
      @retry.retry()
      def success():
          mock_fn()
          return 42
  
      self.assertEqual(success(), 42)
      self.assertEqual(mock_fn.call_count, 1)
      self.mock_sleep.assert_not_called()
  
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 2 for calling the RetryTest obj's underlying member method code with example usage: obj.testSuccessful() and returns: int