class_docstr: Repacks model artifacts with custom inference entry points.
  
  The SDK automatically adds this step to pipelines that have RegisterModelSteps with models
  that have a custom entry point.
class_docstr_tok: ["Repacks","model","artifacts","with","custom","inference","entry","points",".","The","SDK","automatically","adds","this","step","to","pipelines","that","have","RegisterModelSteps","with","models","that","have","a","custom","entry","point","."]
docstr: If the source_dir is None, creates it for the repacking job.
  
  It performs the following:
      1) creates a source directory
      2) copies the inference_entry_point inside it
      3) copies the repack_model.py inside it
      4) sets the source dir for the repacking estimator
docstr_tok: ["If","the","source_dir","is","None",",","creates","it","for","the","repacking","job",".","It","performs","the","following",":","1",")","creates","a","source","directory","2",")","copies","the","inference_entry_point","inside","it","3",")","copies","the","repack_model.py","inside","it","4",")","sets","the","source","dir","for","the","repacking","estimator"]
code: def _establish_source_dir(self):
      """If the source_dir is None, creates it for the repacking job.
  
      It performs the following:
          1) creates a source directory
          2) copies the inference_entry_point inside it
          3) copies the repack_model.py inside it
          4) sets the source dir for the repacking estimator
      """
      self._source_dir = tempfile.mkdtemp()
      self.estimator.source_dir = self._source_dir
  
      shutil.copy2(
          self._entry_point,
          os.path.join(self._source_dir, self._entry_point_basename),
      )
      self._entry_point = self._entry_point_basename
  
imports: from __future__ import absolute_import
  import logging
  import os
  import shutil
  import tarfile
  import tempfile
  from typing import List, Union, Optional, TYPE_CHECKING
  from sagemaker import image_uris
  from sagemaker.inputs import TrainingInput
  from sagemaker.estimator import EstimatorBase
  from sagemaker.sklearn.estimator import SKLearn
  from sagemaker.workflow.entities import RequestType
  from sagemaker.workflow.properties import Properties
  from sagemaker.session import get_create_model_package_request, get_model_package_args
  from sagemaker.workflow.steps import StepTypeEnum, TrainingStep, Step, ConfigurableRetryStep
  from sagemaker.utils import _save_model, download_file_from_url, format_tags
  from sagemaker.workflow.retry import RetryPolicy
  from sagemaker.workflow.utilities import trim_request_dict
label_desc: Use image node_id 3 for calling the _RepackModelStep obj's underlying member method code with example usage: obj._establish_source_dir() without return types