code: def test_no_retry_on_exception_types(self) -> None:
      class MyRuntimeError(RuntimeError):
          pass
  
      class DecoratorTester:
          error_throwing_function_call_count = 0
  
          @retry_on_exception(
              no_retry_on_exception_types=(MyRuntimeError,)
          )
          def error_throwing_function(self) -> None:
              self.error_throwing_function_call_count += 1
              # The exception thrown below should NOT be caught as it does mathes
              # an exception type in `no_retry_on_exception_type`
              raise MyRuntimeError
  
      decorator_tester = DecoratorTester()
      with self.assertRaises(MyRuntimeError):
          decorator_tester.error_throwing_function()
  
      self.assertEqual(
          decorator_tester.error_throwing_function_call_count, 1
      )
  
      # Check that `MyRuntimeError` isn't retriable even if `RuntimeError` is.
      class DecoratorTester:
          error_throwing_function_call_count = 0
  
          @retry_on_exception(
              exception_types=(RuntimeError,),
              no_retry_on_exception_types=(MyRuntimeError,),
          )
          def error_throwing_function(self) -> None:
              self.error_throwing_function_call_count += 1
              # The exception thrown below should NOT be caught as it does mathes
              # an exception type in `no_retry_on_exception_type`
              raise MyRuntimeError
  
      decorator_tester = DecoratorTester()
      with self.assertRaises(MyRuntimeError):
          decorator_tester.error_throwing_function()
  
file_path: Ax/ax/utils/common/tests/test_executils.py
imports: import logging
  import time
  from asyncio import iscoroutinefunction
  from unittest.mock import Mock
  from ax.utils.common.executils import retry_on_exception
  from ax.utils.common.testutils import TestCase
label_desc: Use image node_id 9 for calling the TestRetryDecorator obj's underlying member method code with example usage: obj.test_no_retry_on_exception_types() without return types