code: def test_inject_repack_script_s3(estimator, tmp, fake_s3):
      create_file_tree(
          tmp,
          [
              "model-dir/aa",
              "model-dir/foo/inference.py",
          ],
      )
  
      model_data = Properties(
          step_name="MyStep", shape_name="DescribeModelOutput"
      )
      entry_point = "inference.py"
      source_dir_path = "s3://fake/location"
      session_mock = fake_s3.sagemaker_session
      session_mock.sagemaker_config = {}
      step = _RepackModelStep(
          name="MyRepackModelStep",
          sagemaker_session=session_mock,
          role=estimator.role,
          image_uri="foo",
          model_data=model_data,
          entry_point=entry_point,
          source_dir=source_dir_path,
      )
  
      fake_s3.tar_and_upload("model-dir", "s3://fake/location")
  
      step._prepare_for_repacking()
  
      assert list_tar_files(fake_s3.fake_upload_path, tmp) == {
          "/aa",
          "/foo/inference.py",
          f"/{REPACK_SCRIPT}",
          f"/{REPACK_SCRIPT_LAUNCHER}",
      }
  
file_path: sagemaker-python-sdk/tests/unit/sagemaker/workflow/test_utils.py
imports: from __future__ import absolute_import
  import os
  import shutil
  import tempfile
  import pytest
  from sagemaker.estimator import Estimator
  from sagemaker.workflow._utils import _RepackModelStep, _RegisterModelStep, REPACK_SCRIPT, REPACK_SCRIPT_LAUNCHER
  from sagemaker.workflow.properties import Properties
  from tests.unit.test_utils import FakeS3, list_tar_files
  from tests.unit import DATA_DIR
  from tests.unit.sagemaker.workflow.conftest import ROLE, IMAGE_URI, BUCKET
label_desc: Use image node_id 8 for calling a global function with example usage: test_inject_repack_script_s3(estimator, tmp, fake_s3) without return types