code: def _verify_repack_output(repack_step_dict, sagemaker_session):
      # This is to verify if the `requirements.txt` provided in ModelStep
      # is not auto installed in the Repack step but is successfully repacked
      # in the new model.tar.gz
      # The repack step is using an old version of SKLearn framework "0.23-1"
      # so if the `requirements.txt` is auto installed, it should raise an exception
      # caused by the unsupported library version listed in the `requirements.txt`
      training_job_arn = repack_step_dict["Metadata"]["TrainingJob"][
          "Arn"
      ]
      job_description = (
          sagemaker_session.sagemaker_client.describe_training_job(
              TrainingJobName=training_job_arn.split("/")[1]
          )
      )
      model_uri = job_description["ModelArtifacts"]["S3ModelArtifacts"]
      with tempfile.TemporaryDirectory() as tmp:
          extract_files_from_s3(
              s3_url=model_uri,
              tmpdir=tmp,
              sagemaker_session=sagemaker_session,
          )
  
          def walk():
              results = set()
              for root, dirs, files in os.walk(tmp):
                  relative_path = root.replace(tmp, "")
                  for f in files:
                      results.add(f"{relative_path}/{f}")
              return results
  
          tar_files = walk()
          assert {
              "/code/mnist.py",
              "/code/requirements.txt",
              "/model.pth",
          }.issubset(tar_files)
  
imports: from __future__ import absolute_import
  import json
  import os
  import re
  import tempfile
  import time
  import shutil
  from contextlib import contextmanager
  import pytest
  import pandas
  from sagemaker.utils import retry_with_backoff
  from tests.integ.sagemaker.workflow.helpers import wait_pipeline_execution
  from tests.integ.s3_utils import extract_files_from_s3
  from sagemaker.workflow.model_step import ModelStep, _REGISTER_MODEL_NAME_BASE, _REPACK_MODEL_NAME_BASE
  from sagemaker.parameter import IntegerParameter
  from sagemaker.pytorch import PyTorch, PyTorchModel
  from sagemaker.tuner import HyperparameterTuner
  from tests.integ.timeout import timeout
  from sagemaker.session import Session
  from sagemaker import image_uris
  from sagemaker.estimator import Estimator
  from sagemaker.inputs import CreateModelInput, TrainingInput
  from sagemaker.model import Model
  from sagemaker.model_metrics import MetricsSource, ModelMetrics
  from sagemaker.processing import ProcessingInput, ProcessingOutput, FeatureStoreOutput, ScriptProcessor
  from sagemaker.s3 import S3Uploader
  from sagemaker.session import get_execution_role
  from sagemaker.sklearn.estimator import SKLearn
  from sagemaker.transformer import Transformer
  from sagemaker.sklearn.processing import SKLearnProcessor
  from sagemaker.workflow.conditions import ConditionGreaterThanOrEqualTo, ConditionLessThanOrEqualTo
  from sagemaker.workflow.condition_step import ConditionStep
  from sagemaker.workflow.callback_step import CallbackStep, CallbackOutput, CallbackOutputTypeEnum
  from sagemaker.wrangler.processing import DataWranglerProcessor
  from sagemaker.dataset_definition.inputs import DatasetDefinition, AthenaDatasetDefinition
  from sagemaker.workflow.execution_variables import ExecutionVariables
  from sagemaker.workflow.functions import Join, JsonGet
  from sagemaker.wrangler.ingestion import generate_data_ingestion_flow_from_s3_input
  from sagemaker.workflow.parameters import ParameterInteger, ParameterString
  from sagemaker.workflow.steps import CreateModelStep, ProcessingStep, TrainingStep, TransformStep, TransformInput, PropertyFile, TuningStep
  from sagemaker.workflow.step_collections import RegisterModel
  from sagemaker.workflow.pipeline import Pipeline
  from sagemaker.workflow.utilities import hash_files_or_dirs
  from sagemaker.feature_store.feature_group import FeatureGroup, FeatureDefinition, FeatureTypeEnum
  from tests.integ import DATA_DIR
label_desc: Use image node_id 20 for calling a global function with example usage: _verify_repack_output(repack_step_dict, sagemaker_session) and returns: results