code: def test_upload_artifacts_sagemaker_triton_server(
      self, mock_upload, mock_platform
  ):
      mock_session = Mock()
      mock_platform.python_version.return_value = "3.8"
      mock_upload.side_effect = (
          lambda session, repo, bucket, prefix: S3_URI
          if session == mock_session
          and repo == MODEL_PATH + "/model_repository"
          and bucket == "mock_model_data_uri"
          else None
      )
  
      (
          s3_upload_path,
          env_vars,
      ) = SageMakerTritonServer()._upload_triton_artifacts(
          model_path=MODEL_PATH,
          sagemaker_session=mock_session,
          secret_key=SECRET_KEY,
          s3_model_data_url=S3_URI,
          image=GPU_TRITON_IMAGE,
      )
  
      mock_upload.assert_called_once_with(
          mock_session, MODEL_REPO, "mock_model_data_uri", ANY
      )
      self.assertEqual(s3_upload_path, S3_URI)
      self.assertEqual(
          env_vars.get("SAGEMAKER_TRITON_DEFAULT_MODEL_NAME"), "model"
      )
      self.assertEqual(
          env_vars.get("TRITON_MODEL_DIR"), "/opt/ml/model/model"
      )
      self.assertEqual(
          env_vars.get("SAGEMAKER_SERVE_SECRET_KEY"), SECRET_KEY
      )
      self.assertEqual(env_vars.get("LOCAL_PYTHON"), "3.8")
  
file_path: sagemaker-python-sdk/tests/unit/sagemaker/serve/model_server/triton/test_server.py
imports: from __future__ import absolute_import
  from unittest import TestCase
  from unittest.mock import Mock, patch, ANY
  import numpy
  from docker.types import DeviceRequest
  from sagemaker.serve.model_server.triton.server import LocalTritonServer, SageMakerTritonServer
label_desc: Use image node_id 3 for calling the TritonServerTests obj's underlying member method code with example usage: obj.test_upload_artifacts_sagemaker_triton_server(mock_upload, mock_platform) without return types