code: def test_retry_respects_retryable_exceptions():
      func = mock.Mock()
      func.side_effect = ValueError
  
      retrier = retry.Retry(
          func,
          retryable_exceptions=(ValueError,),
          num_retries=3,
      )
      with pytest.raises(ValueError):
          retrier()
  
      assert func.call_count > 1
  
      func.reset_mock()
      func.side_effect = IndexError
      retrier = retry.Retry(
          func,
          retryable_exceptions=(ValueError,),
      )
      with pytest.raises(IndexError):
          retrier()
  
      assert func.call_count == 1
  
imports: import asyncio
  import dataclasses
  import datetime
  from typing import Iterator
  from unittest import mock
  import pytest
  from wandb.sdk.lib import retry
label_desc: Use image node_id 5 for calling a global function with example usage: test_retry_respects_retryable_exceptions() without return types