code: def test_capture_telemetry_decorator_handle_exception_success(
      self, mock_send_telemetry
  ):
      mock_model_builder = ModelBuilderMock()
      mock_model_builder.serve_settings.telemetry_opt_out = False
      mock_model_builder.image_uri = MOCK_DJL_CONTAINER
      mock_model_builder.model = MOCK_HUGGINGFACE_ID
      mock_model_builder.mode = Mode.LOCAL_CONTAINER
      mock_model_builder.model_server = ModelServer.DJL_SERVING
  
      mock_exception = Mock()
      mock_exception_obj = MOCK_EXCEPTION
      mock_exception.side_effect = mock_exception_obj
  
      with self.assertRaises(ModelBuilderException) as _:
          mock_model_builder.mock_deploy(mock_exception)
  
      expected_extra_str = (
          f"{MOCK_FUNC_NAME}"
          "&x-modelServer=4"
          "&x-imageTag=djl-inference:0.25.0-deepspeed0.11.0-cu118"
          f"&x-modelName={MOCK_HUGGINGFACE_ID}"
      )
      mock_send_telemetry.assert_called_once_with(
          "0",
          2,
          MOCK_SESSION,
          str(mock_exception_obj),
          mock_exception_obj.__class__.__name__,
          expected_extra_str,
      )
  
file_path: sagemaker-python-sdk/tests/unit/sagemaker/serve/utils/test_telemetry_logger.py
imports: from __future__ import absolute_import
  import unittest
  from unittest.mock import Mock, patch
  from sagemaker.serve import Mode, ModelServer
  from sagemaker.serve.utils.telemetry_logger import _send_telemetry, _capture_telemetry, _construct_url
  from sagemaker.serve.utils.exceptions import ModelBuilderException, LocalModelOutOfMemoryException
label_desc: Use image node_id 6 for calling the TestTelemetryLogger obj's underlying member method code with example usage: obj.test_capture_telemetry_decorator_handle_exception_success(mock_send_telemetry) without return types