def test_retry_decorator_with_retries(self):
        """Ensures the function retries upon exception."""

        class TestClass:
            retries = 3
            backoff_factor = 0.1
            timeout = 10

            call_count = 0

            @_retry_decorator
            def test_method(self):
                self.call_count += 1
                if self.call_count < 3:
                    raise ExtendedRequestException(
                        "Error",
                        original_exception=httpx.RequestError("Error"),
                        response_text="test",
                    )
                return "Success"

        test_instance = TestClass()
        result = test_instance.test_method()
        assert result == "Success"
        assert test_instance.call_count == 3
Ensures the function retries upon exception.
llama-index-integrations/embeddings/llama-index-embeddings-oci-data-science/tests/test_oci_data_science_client.py