code: def test_extract_js_resources_success(self, mock_tarfile, mock_path):
      mock_path_obj = Mock()
      mock_path_obj.joinpath.return_value = Mock()
      mock_path.return_value = mock_path_obj
  
      mock_tar_obj = Mock()
      mock_enter = Mock()
      mock_resource_obj = Mock()
      mock_enter.return_value = mock_resource_obj
      type(mock_tar_obj).__enter__ = PropertyMock(
          return_value=mock_enter
      )
      type(mock_tar_obj).__exit__ = PropertyMock(return_value=Mock())
      mock_tarfile.open.return_value = mock_tar_obj
  
      js_model_dir = ""
      code_dir = Mock()
      _extract_js_resource(js_model_dir, code_dir, MOCK_JUMPSTART_ID)
  
      mock_path.assert_called_once_with(js_model_dir)
      mock_path_obj.joinpath.assert_called_once_with(
          f"infer-prepack-{MOCK_JUMPSTART_ID}.tar.gz"
      )
      mock_resource_obj.extractall.assert_called_once_with(
          path=code_dir
      )
  
file_path: sagemaker-python-sdk/tests/unit/sagemaker/serve/model_server/tgi/test_tgi_prepare.py
imports: from __future__ import absolute_import
  from unittest import TestCase
  from unittest.mock import Mock, PropertyMock, patch
  from sagemaker.serve.model_server.tgi.prepare import _create_dir_structure, _copy_jumpstart_artifacts, _extract_js_resource
  from tests.unit.sagemaker.serve.model_server.constants import MOCK_JUMPSTART_ID, MOCK_TMP_DIR, MOCK_COMPRESSED_MODEL_DATA_STR, MOCK_UNCOMPRESSED_MODEL_DATA_STR, MOCK_UNCOMPRESSED_MODEL_DATA_STR_FOR_DICT, MOCK_UNCOMPRESSED_MODEL_DATA_DICT, MOCK_INVALID_MODEL_DATA_DICT
label_desc: Use image node_id 7 for calling the TgiPrepareTests obj's underlying member method code with example usage: obj.test_extract_js_resources_success(mock_tarfile, mock_path) without return types